@font-face {
  font-family: "Press Start 2P";
  src: url("assets/vendor/press-start-2p.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #0b0d10;
  --bg-elevated: #121419;
  --panel: #171921;
  --panel-strong: #1d2029;
  --line: #2a2d38;
  --text: #f7f4ff;
  --muted: #a9a6b3;
  --purple: #cf4fff;
  --purple-soft: #a970d6;
  --cyan: #52d5d0;
  --gold: #f6b94b;
  --green: #59d98e;
  --red: #ff667a;
  --header-height: 70px;
  --pixel-font: "Press Start 2P", monospace;
  --body-font: Inter, "Segoe UI", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  line-height: 1.55;
  letter-spacing: 0;
}
body.menu-open { overflow: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  transform: translateY(-150%);
  background: var(--text);
  color: #111;
  padding: 10px 14px;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(18px, 4vw, 64px);
  background: rgba(9, 10, 14, .88);
  border-bottom: 1px solid rgba(255,255,255,.09);
  backdrop-filter: blur(18px);
  transition: background .25s ease, height .25s ease;
}
.site-header.is-scrolled { height: 60px; background: rgba(9, 10, 14, .96); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.brand img { width: 54px; height: 36px; object-fit: contain; }
.brand span { font-family: var(--pixel-font); font-size: 11px; line-height: 1.4; }
.brand b { color: var(--purple); font-weight: 400; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  color: #d4d1db;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  transition: color .2s ease, background .2s ease;
}
.main-nav > a::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 3px;
  height: 2px;
  background: var(--purple);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.main-nav > a:hover, .main-nav > a.is-active { color: #fff; }
.main-nav > a:hover::after, .main-nav > a.is-active::after { transform: scaleX(1); }
.main-nav .shop-link { margin-left: 8px; background: var(--purple); color: #120818; }
.main-nav .shop-link::after { display: none; }
.main-nav .shop-link:hover { background: #e17aff; color: #120818; }
.main-nav svg, .icon-button svg, .primary-button svg, .server-address svg, .text-link svg, .search-field svg { width: 18px; height: 18px; stroke-width: 2; }
.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: #fff;
  cursor: pointer;
}
.menu-toggle { display: none; }

.view { display: none; animation: view-in .42s ease both; }
.view.is-active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hero {
  position: relative;
  min-height: min(880px, 92vh);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background: #172033 url("assets/hexxit-world-hero.png") center center / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(26, 8, 35, .24);
  box-shadow: inset 0 -210px 150px -100px #0b0d10, inset 0 110px 90px -80px #08090c, inset 0 0 120px rgba(124, 32, 157, .12);
}
.hero-content {
  width: min(900px, 92vw);
  padding-top: var(--header-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-shadow: 0 3px 20px #000;
}
.hero-logo {
  width: min(640px, 78vw);
  max-height: 410px;
  object-fit: contain;
  margin: -68px auto -70px;
  filter: drop-shadow(0 0 12px rgba(207, 79, 255, .78)) drop-shadow(0 18px 18px rgba(0,0,0,.78));
  animation: logo-float 5s ease-in-out infinite;
}
@keyframes logo-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero h1, .page-hero h1 {
  margin: 0;
  font-family: var(--pixel-font);
  font-size: clamp(22px, 4.1vw, 51px);
  line-height: 1.3;
  letter-spacing: 0;
}
.hero h1 span { color: var(--purple); }
.hero-copy { max-width: 690px; margin: 18px auto 24px; color: #f0edf5; font-size: clamp(15px, 2vw, 19px); font-weight: 600; }
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 12px;
  margin-bottom: 8px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(8,10,13,.68);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px currentColor; }
.live-badge.is-online .status-dot { background: var(--green); animation: status-pulse 1.8s infinite; }
.live-badge.is-offline .status-dot { background: var(--red); }
@keyframes status-pulse { 50% { box-shadow: 0 0 0 7px rgba(89,217,142,0); } }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.primary-button, .server-address {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border-radius: 4px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.primary-button { border: 1px solid #eea0ff; background: var(--purple); color: #15071a; box-shadow: 0 0 26px rgba(207,79,255,.28); }
.server-address { border: 1px solid rgba(255,255,255,.25); background: rgba(8,10,13,.78); color: #fff; }
.primary-button:hover, .server-address:hover { transform: translateY(-2px); }
.server-address:hover { border-color: var(--cyan); }
.online-readout { margin-top: 22px; display: flex; align-items: baseline; gap: 9px; }
.online-readout strong { color: var(--cyan); font-family: var(--pixel-font); font-size: 18px; }
.online-readout span { color: #ddd9e3; font-size: 13px; font-weight: 700; text-transform: uppercase; }
.hero-edge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 116px;
  background: linear-gradient(to bottom, rgba(8,10,13,0), #080a0d);
  pointer-events: none;
}
.pixel-sparks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pixel-spark { position: absolute; width: 3px; height: 3px; background: rgba(255,255,255,.6); animation: spark-rise linear infinite; }
@keyframes spark-rise { from { transform: translateY(20px); opacity: 0; } 15% { opacity: .65; } to { transform: translateY(-130px); opacity: 0; } }

.content-band { width: min(1280px, 100%); margin: 0 auto; padding: 88px clamp(20px, 5vw, 72px); }
.home-overview.content-band { padding-top: 12px; }
.home-overview .section-heading { opacity: 1; transform: none; }
.content-band.compact { padding-top: 48px; min-height: 58vh; }
.section-heading { max-width: 730px; margin-bottom: 40px; }
.section-heading h2, .feature-copy h2 { margin: 4px 0 10px; font-size: clamp(28px, 4vw, 48px); line-height: 1.12; }
.section-heading p:last-child, .feature-copy > p:last-of-type { color: var(--muted); font-size: 17px; }
.eyebrow { margin: 0 0 10px; color: var(--purple); font-size: 12px; font-weight: 800; text-transform: uppercase; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.metric { min-height: 148px; padding: 26px; border-right: 1px solid var(--line); background: var(--panel); }
.metric:last-child { border-right: 0; }
.metric svg { width: 22px; height: 22px; color: var(--cyan); }
.metric strong { display: block; margin: 18px 0 4px; font-family: var(--pixel-font); font-size: 21px; line-height: 1.35; }
.metric span { color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; }

.feature-band { display: grid; grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr); gap: clamp(48px, 8vw, 120px); align-items: center; padding: 76px max(5vw, calc((100vw - 1136px) / 2)); background: #11131a; border-block: 1px solid var(--line); }
.feature-copy { max-width: 560px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--cyan); font-weight: 800; }
.feature-stats { border-top: 1px solid var(--line); }
.leader-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 16px; align-items: center; min-height: 74px; border-bottom: 1px solid var(--line); }
.leader-row .rank { color: var(--purple); font-family: var(--pixel-font); font-size: 12px; }
.leader-row strong { font-size: 15px; }
.leader-row span:last-child { color: var(--gold); font-weight: 800; }

.page-view { padding-top: var(--header-height); }
.page-hero { padding: 74px max(5vw, calc((100vw - 1136px) / 2)) 52px; background: #12141b; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(28px, 4.6vw, 57px); }
.page-hero > p:last-child { max-width: 720px; margin: 20px 0 0; color: var(--muted); font-size: 17px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 22px; }
.segmented-control, .filter-row { display: flex; flex-wrap: wrap; gap: 6px; }
.segment, .filter-button {
  min-height: 39px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.segment:hover, .segment.is-active, .filter-button:hover, .filter-button.is-active { border-color: var(--purple); color: #fff; background: #24192c; }
.search-field { min-width: 245px; display: flex; align-items: center; gap: 9px; padding: 0 13px; min-height: 42px; border: 1px solid var(--line); background: var(--panel); }
.search-field:focus-within { border-color: var(--cyan); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: #fff; }
.ranking-reward { min-height: 44px; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 14px; background: #18221e; border-left: 3px solid var(--green); color: #cfe8d9; font-size: 13px; font-weight: 700; }
.ranking-reward.is-danger { background: #28171b; border-left-color: var(--red); color: #ff9dab; }
.ranking-reward.is-danger svg { color: var(--red); }
.table-shell { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th { height: 48px; padding: 0 20px; text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase; background: #111319; }
td { height: 62px; padding: 0 20px; border-top: 1px solid var(--line); font-weight: 600; }
td:first-child { width: 90px; color: var(--purple); font-family: var(--pixel-font); font-size: 11px; }
tr:nth-child(1) td:first-child { color: var(--gold); }
tr:nth-child(2) td:first-child { color: #d7dde7; }
tr:nth-child(3) td:first-child { color: #c98457; }
.player-cell { display: flex; align-items: center; gap: 12px; }
.player-head-shell { position: relative; width: 36px; height: 36px; flex: 0 0 36px; overflow: hidden; background: #242730; border: 1px solid #373a45; }
.player-head-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--purple-soft); font-family: var(--pixel-font); font-size: 10px; }
.player-head { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.value-cell { color: var(--cyan); font-variant-numeric: tabular-nums; }
.empty-state { padding: 44px 20px; color: var(--muted); text-align: center; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 18px; }
.pagination button { min-width: 38px; height: 38px; border: 1px solid var(--line); background: var(--panel); color: #fff; cursor: pointer; }
.pagination button:disabled { opacity: .4; cursor: default; }

.filter-row { margin-bottom: 26px; }
.world-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.world-card, .town-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); transition: transform .18s ease, border-color .18s ease; }
.world-card:hover, .town-card:hover { transform: translateY(-3px); border-color: #654b74; }
.world-card::before { content: ""; display: block; height: 5px; background: var(--world-accent, var(--purple)); }
.world-card-inner { padding: 22px; }
.world-type { display: inline-flex; align-items: center; gap: 7px; color: var(--world-accent, var(--purple)); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.world-card h3, .town-card h3 { margin: 14px 0 7px; font-size: 21px; }
.world-card p { min-height: 48px; margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.detail-list { display: grid; gap: 10px; }
.detail-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.detail-row span { color: var(--muted); }
.detail-row strong { text-align: right; }

.rank-track { position: relative; display: grid; gap: 0; }
.rank-row { display: grid; grid-template-columns: 90px minmax(180px, .7fr) minmax(250px, 1.3fr); gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.rank-index { display: flex; align-items: flex-start; gap: 12px; color: var(--purple); font-family: var(--pixel-font); font-size: 12px; }
.rank-cube { width: 18px; height: 18px; background: var(--rank-color, var(--purple)); box-shadow: inset -4px -4px rgba(0,0,0,.25), 0 0 14px color-mix(in srgb, var(--rank-color, var(--purple)) 50%, transparent); }
.rank-title h3 { margin: 0 0 7px; font-size: 23px; }
.rank-title p { margin: 0; color: var(--muted); font-size: 13px; }
.rank-title .minecraft-prefix { min-height: 28px; display: flex; align-items: center; font-family: var(--pixel-font); font-size: 12px; line-height: 1.8; text-shadow: 0 2px 0 rgba(0,0,0,.85), 0 0 14px rgba(255,255,255,.08); }
.rank-costs { display: flex; gap: 16px; margin-top: 14px; }
.rank-costs span { padding: 5px 8px; background: #14161c; border: 1px solid var(--line); color: #d9d5df; font-size: 12px; }
.perk-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 18px; }
.perk { display: flex; gap: 9px; color: #d9d6de; font-size: 13px; }
.perk svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; color: var(--green); }

.town-summary { display: flex; gap: 26px; color: var(--muted); font-size: 13px; }
.town-summary strong { color: #fff; font-family: var(--pixel-font); font-size: 14px; }
.town-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.town-card { padding: 22px; }
.town-card-head { display: flex; justify-content: space-between; gap: 16px; }
.town-card h3 { margin-top: 0; }
.town-leader { color: var(--gold); font-size: 12px; font-weight: 800; }
.town-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 20px 0; border-block: 1px solid var(--line); }
.town-stat { padding: 14px 8px; border-right: 1px solid var(--line); }
.town-stat:last-child { border-right: 0; }
.town-stat strong { display: block; font-size: 17px; }
.town-stat span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.member-list { display: flex; flex-wrap: wrap; gap: 6px; }
.member-tag { padding: 5px 8px; background: #111319; border: 1px solid #292c35; color: #c9c6cf; font-size: 11px; }

.global-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.global-stat { min-height: 210px; padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.global-stat:nth-child(3n) { border-right: 0; }
.global-stat:nth-last-child(-n+3) { border-bottom: 0; }
.global-stat svg { width: 27px; height: 27px; color: var(--stat-accent, var(--purple)); }
.global-stat strong { display: block; margin: 26px 0 8px; font-family: var(--pixel-font); font-size: clamp(19px, 2.2vw, 27px); line-height: 1.35; }
.global-stat span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.global-stat p { margin: 10px 0 0; color: #777480; font-size: 12px; }
.data-freshness { margin-top: 16px; color: var(--muted); font-size: 12px; text-align: right; }

.connect-dialog { width: min(660px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 34px; border: 1px solid #684279; border-radius: 6px; background: #11131a; color: #fff; box-shadow: 0 24px 100px #000; }
.connect-dialog::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(5px); }
.connect-dialog > img { width: 130px; height: 60px; margin: -8px auto 16px; object-fit: contain; }
.connect-dialog h2 { margin: 0 0 24px; font-size: 28px; text-align: center; }
.connect-dialog > .eyebrow { text-align: center; }
.dialog-close { position: absolute; top: 14px; right: 14px; }
.connect-dialog ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.connect-dialog li { display: grid; grid-template-columns: 46px 1fr; gap: 14px; align-items: start; padding: 14px; border: 1px solid var(--line); background: #171921; }
.connect-dialog li > span { color: var(--purple); font-family: var(--pixel-font); font-size: 11px; }
.connect-dialog li strong { display: block; }
.connect-dialog li p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.connect-dialog code { color: var(--cyan); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.dialog-actions > * { flex: 1 1 240px; }

.toast { position: fixed; z-index: 300; left: 50%; bottom: 24px; transform: translate(-50%, 30px); padding: 11px 16px; border: 1px solid var(--cyan); background: #11161a; color: #fff; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 28px clamp(20px, 5vw, 72px); border-top: 1px solid var(--line); background: #08090c; color: #777480; font-size: 12px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #d7d3dd; font-weight: 800; }
.footer-brand img { width: 72px; height: 30px; object-fit: contain; }
footer a { color: var(--purple-soft); font-weight: 700; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a:hover { color: #fff; }

.legal-content { max-width: 1040px; }
.legal-updated { margin: 0 0 28px; color: var(--muted); font-size: 13px; }
.legal-section { padding: 30px 0; border-top: 1px solid rgba(211,194,220,.16); }
.legal-section:first-of-type { border-top: 0; padding-top: 0; }
.legal-section h2 { margin: 0 0 16px; color: #fff; font-size: clamp(20px, 2.8vw, 28px); }
.legal-section p { max-width: 900px; margin: 0 0 14px; color: #c3beca; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section address { color: #d8d3dd; font-style: normal; line-height: 1.8; }
.legal-section a { color: var(--cyan); text-decoration: underline; text-decoration-color: rgba(82,213,208,.38); text-underline-offset: 3px; }
.legal-section a:hover { color: #fff; text-decoration-color: var(--cyan); }
.legal-note { padding: 14px 16px; border-left: 3px solid var(--gold); background: rgba(246,185,75,.06); color: #ded2bb !important; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1060px) {
  .menu-toggle { display: inline-grid; }
  .main-nav { position: fixed; z-index: 110; top: var(--header-height); right: 0; width: min(360px, 88vw); height: calc(100vh - var(--header-height)); height: calc(100dvh - var(--header-height)); display: flex; flex-direction: column; align-items: stretch; padding: 20px; overflow-y: auto; background: #0d0f14; border-left: 1px solid var(--line); box-shadow: -18px 0 36px rgba(0,0,0,.42); transform: translateX(105%); transition: transform .25s ease; }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav > a { min-height: 48px; border-bottom: 1px solid var(--line); }
  .main-nav .shop-link { margin: 12px 0 0; justify-content: center; border: 0; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .feature-band { grid-template-columns: 1fr; }
  .world-grid { grid-template-columns: repeat(2, 1fr); }
  .global-grid { grid-template-columns: repeat(2, 1fr); }
  .global-stat, .global-stat:nth-child(3n) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .global-stat:nth-child(2n) { border-right: 0; }
  .global-stat:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 720px) {
  :root { --header-height: 60px; }
  .site-header { height: var(--header-height); padding-inline: 14px; }
  .brand { min-width: 0; }
  .brand img { width: 48px; }
  .brand span { font-size: 9px; }
  .hero { min-height: 680px; background-position: 58% center; }
  .hero-logo { width: min(590px, 94vw); margin: -46px auto -50px; }
  .hero h1 { font-size: 23px; }
  .hero-copy { font-size: 15px; }
  .hero-actions { width: min(420px, 100%); }
  .hero-actions > * { width: 100%; }
  .content-band { padding: 64px 18px; }
  .content-band.compact { padding-top: 30px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:last-child { border-bottom: 0; }
  .content-band { padding-top: 56px; }
  .feature-band { padding: 62px 18px; }
  .page-hero { padding: 54px 18px 38px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-field { min-width: 0; width: 100%; }
  .segmented-control { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .segment { flex: 0 0 auto; }
  th, td { padding-inline: 12px; }
  table { table-layout: fixed; }
  th:first-child, td:first-child { width: 48px; }
  th:last-child, td:last-child { width: 108px; text-align: right; }
  .player-cell { min-width: 0; gap: 8px; }
  .player-head-shell { width: 32px; height: 32px; flex: 0 0 32px; }
  .player-cell span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .value-cell { font-size: 13px; white-space: nowrap; }
  .world-grid, .town-grid, .global-grid { grid-template-columns: 1fr; }
  .global-stat, .global-stat:nth-child(2n), .global-stat:nth-child(3n) { border-right: 0; border-bottom: 1px solid var(--line); }
  .global-stat:last-child { border-bottom: 0; }
  .rank-row { grid-template-columns: 48px 1fr; gap: 16px; }
  .rank-benefits { grid-column: 2; }
  .perk-list { grid-template-columns: 1fr; }
  .town-summary { justify-content: space-between; }
  footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Layered game surfaces */
body {
  background: #080a0d;
}

.brand { min-width: 174px; }
.brand span {
  padding-left: 13px;
  border-left: 3px solid var(--purple);
  text-shadow: 0 0 18px rgba(207, 79, 255, .36);
}

.live-badge {
  min-height: 28px;
  padding: 0;
  margin-bottom: 12px;
  border: 0;
  background: transparent;
  text-shadow: 0 2px 12px #000;
}
.status-dot {
  position: relative;
  width: 10px;
  height: 10px;
  box-shadow: 0 0 8px currentColor, 0 0 20px currentColor;
}
.live-badge.is-online .status-dot { animation: server-ping 1.7s ease-out infinite; }
@keyframes server-ping {
  0%, 100% { box-shadow: 0 0 8px #59d98e, 0 0 18px rgba(89,217,142,.62); }
  55% { box-shadow: 0 0 12px #59d98e, 0 0 0 9px rgba(89,217,142,0); }
}
.online-readout {
  margin: 22px 0 0;
  color: #f1edf5;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 2px 12px #000;
}

.home-overview.content-band { padding-top: 22px; padding-bottom: 74px; }
.metric-grid {
  gap: 14px;
  border: 0;
}
.metric,
.global-stat {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(211, 194, 220, .16);
  background: rgba(17, 19, 25, .76);
  backdrop-filter: blur(16px) saturate(112%);
  box-shadow: inset 0 1px rgba(255,255,255,.055), 0 22px 60px rgba(0,0,0,.3);
  border-radius: 4px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.metric::after,
.global-stat::after {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 2px;
  background: var(--stat-accent, var(--cyan));
  box-shadow: 0 0 16px var(--stat-accent, var(--cyan));
  opacity: .78;
}
.metric:hover,
.global-stat:hover {
  transform: translateY(-4px);
  border-color: rgba(207,79,255,.6);
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 19px 48px rgba(0,0,0,.34), 0 0 28px rgba(207,79,255,.1);
}
.metric { min-height: 156px; border-right: 1px solid rgba(177,151,189,.24); }
.metric:last-child { border-right: 1px solid rgba(177,151,189,.24); }
.metric:nth-child(1) { --stat-accent: var(--purple); }
.metric:nth-child(2) { --stat-accent: var(--cyan); }
.metric:nth-child(3) { --stat-accent: var(--gold); }
.metric:nth-child(4) { --stat-accent: var(--green); }
.metric svg { color: var(--stat-accent); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--stat-accent) 50%, transparent)); }

.feature-band {
  background-color: rgba(13,15,20,.93);
  background-image: url("assets/hexxit-page-banner.png");
  background-size: cover;
  background-position: center 58%;
  background-blend-mode: multiply;
  box-shadow: inset 0 0 90px #08090c;
}

.page-hero {
  position: relative;
  isolation: isolate;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background-color: rgba(8, 9, 13, .58);
  background-image: url("assets/hexxit-page-banner.png");
  background-size: cover;
  background-position: center 43%;
  background-blend-mode: multiply;
  border-bottom: 0;
  box-shadow: inset 0 -110px 90px -60px #080a0d, inset 0 0 100px rgba(0,0,0,.35);
}
.page-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 92px;
  background: linear-gradient(to bottom, rgba(8,10,13,0), #080a0d);
}
.page-hero h1 { text-shadow: 0 4px 24px #000, 0 0 30px rgba(207,79,255,.2); }
.page-hero > p:last-child { color: #d3ced8; text-shadow: 0 2px 12px #000; }

.content-band.compact {
  position: relative;
  isolation: isolate;
  background: #080a0d;
}
.content-band.compact::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -16%;
  bottom: 10%;
  width: 66%;
  height: 1px;
  transform: rotate(-8deg);
  background: transparent;
  box-shadow: 0 0 65px 28px rgba(174,57,217,.12), 0 0 110px 52px rgba(82,213,208,.035);
  pointer-events: none;
}
.table-shell,
.world-card,
.town-card,
.rank-row,
.search-field,
.segment,
.filter-button,
.ranking-reward {
  box-shadow: inset 0 1px rgba(255,255,255,.045), 0 14px 36px rgba(0,0,0,.16);
}
.table-shell,
.world-card,
.town-card {
  border-color: rgba(211,194,220,.16);
  background: rgba(16,18,24,.78);
  backdrop-filter: blur(16px) saturate(112%);
}
.world-card,
.town-card {
  border-radius: 4px;
}
.world-card:hover,
.town-card:hover { border-color: rgba(207,79,255,.68); box-shadow: 0 18px 50px rgba(0,0,0,.34), 0 0 26px rgba(207,79,255,.1); }
.world-card::after,
.town-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 2px;
  background: var(--world-accent, var(--purple));
  box-shadow: 0 0 16px var(--world-accent, var(--purple));
  opacity: .7;
}

.rank-row {
  margin-bottom: 10px;
  padding: 26px 22px;
  border: 1px solid rgba(211,194,220,.15);
  background: rgba(16,18,24,.76);
  backdrop-filter: blur(14px);
}
.rank-row:hover { border-color: color-mix(in srgb, var(--rank-color) 48%, #2a2d38); }

.town-card { padding: 24px; }
.town-card-head { align-items: flex-start; }
.town-emblem {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(207,79,255,.28);
  background: rgba(207,79,255,.07);
  color: var(--purple-soft);
}
.town-emblem svg { width: 20px; height: 20px; }
.member-tag { background: rgba(9,11,15,.72); border-color: rgba(255,255,255,.09); color: #9f9ca7; }
.member-tag.is-leader { color: #f6cf81; border-color: rgba(246,185,75,.42); background: rgba(246,185,75,.075); }
.member-tag.is-co-leader { color: #ad91ba; border-color: rgba(169,112,214,.25); background: rgba(169,112,214,.045); }

.global-grid { gap: 14px; border: 0; }
.global-stat,
.global-stat:nth-child(3n),
.global-stat:nth-last-child(-n+3) { border: 1px solid rgba(177,151,189,.24); }
.data-freshness { color: #817d88; }

.table-shell table {
  background: rgba(16,18,24,.72);
}

@media (max-width: 1060px) {
  .metric,
  .metric:nth-child(2),
  .metric:nth-child(-n+2),
  .global-stat,
  .global-stat:nth-child(2n),
  .global-stat:nth-child(3n),
  .global-stat:nth-last-child(-n+2) { border: 1px solid rgba(177,151,189,.24); }
}

@media (max-width: 720px) {
  .brand { min-width: 0; }
  .brand span { font-size: 9px; }
  .online-readout { max-width: 330px; font-size: 12px; line-height: 1.7; }
  .home-overview.content-band { padding-top: 18px; padding-bottom: 56px; }
  .page-hero { min-height: 250px; background-position: 68% center; }
  .metric,
  .global-stat,
  .global-stat:last-child { border: 1px solid rgba(177,151,189,.24); }
  .rank-row { padding: 22px 16px; }
}
