/* Create Economy website */
:root {
  --bg: #15120e;
  --bg-2: #1c1813;
  --panel: #241e18;
  --panel-2: #2d261e;
  --edge-hi: #5c4c3b;
  --edge-lo: #0b0907;
  --grid: rgba(224, 168, 58, .07);
  --text: #f1e8d8;
  --muted: #b4a68e;
  --faint: #7d705d;
  --brass: #e0a83a;
  --brass-2: #f5c862;
  --brass-dk: #8f6219;
  --copper: #cf7442;
  --andesite: #a2a8a2;
  --blue: #4b9be0;
  --blue-dk: #12304d;
  --green: #6bdc6b;
  --red: #ec5a4f;
  --discord: #5865f2;
  --radius: 6px;
  --pixel: "Pixelify Sans", "Trebuchet MS", sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--brass-2); }
h1, h2, h3, h4 { font-family: var(--pixel); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: .01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brass-2); outline-offset: 2px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--brass); color: #000; padding: 8px 12px; }
.skip:focus { left: 8px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin: 0 auto; }

/* ---------- panels: bevelled, a little like an in-game GUI ---------- */
.panel {
  background: var(--panel);
  border: 2px solid var(--edge-lo);
  border-radius: var(--radius);
  box-shadow: inset 2px 2px 0 var(--edge-hi), inset -2px -2px 0 rgba(0, 0, 0, .45), 0 10px 30px rgba(0, 0, 0, .25);
}
.panel-title {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: var(--pixel); font-size: 18px; color: var(--brass-2);
  padding: 14px 16px 10px;
}
.count { font-family: var(--mono); font-size: 14px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; min-height: 42px;
  font: 600 15px/1 var(--body); text-decoration: none; cursor: pointer;
  border: 2px solid #000; border-radius: 4px;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .25), inset -2px -3px 0 rgba(0, 0, 0, .3);
  transition: transform .08s ease, filter .15s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(2px); box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .25); }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.btn.lg { min-height: 50px; padding: 12px 22px; font-size: 16px; }
.btn-brass { background: linear-gradient(#f2c25c, #c98b26); color: #2a1a03; }
.btn-ghost { background: #3a3128; color: var(--text); border-color: #0d0b09; }
.btn-discord { background: var(--discord); color: #fff; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 10px max(16px, (100% - var(--wrap)) / 2);
  background: rgba(21, 18, 14, .88);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid #000;
  box-shadow: 0 1px 0 var(--edge-hi);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 22px var(--pixel); }
.brand b { color: var(--brass); font-weight: 700; }
.brand-cog { width: 30px; height: 30px; color: var(--brass); animation: spin 12s linear infinite; }
.nav-links { display: flex; gap: 4px; margin-right: auto; }
.nav-links a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 4px; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: #2c251d; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); padding: 6px 10px; border: 1px solid #3a3027; border-radius: 99px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); display: inline-block; flex: none; }
.is-up .dot, .dot.up { background: var(--green); box-shadow: 0 0 0 3px rgba(107, 220, 107, .2); animation: pulse 2s ease-in-out infinite; }
.is-down .dot { background: var(--red); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 3px; background: var(--text); margin: 4px 0; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 64px 0 72px; overflow: hidden; border-bottom: 2px solid #000;
  background:
    radial-gradient(800px 400px at 80% 20%, rgba(224, 168, 58, .14), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--bg);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.bg-cog { position: absolute; color: #2a231b; }
.bg-cog.c1 { width: 420px; left: -150px; bottom: -190px; animation: spin 60s linear infinite; }
.bg-cog.c2 { width: 230px; left: 210px; bottom: -150px; animation: spin 33s linear infinite reverse; color: #251f18; }
.bg-cog.c3 { width: 300px; right: -120px; top: -140px; animation: spin 48s linear infinite reverse; color: #231d16; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { font: 600 13px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--copper); margin-bottom: 14px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); margin-bottom: 20px; text-shadow: 3px 3px 0 #000; }
.brass { color: var(--brass); }
.lede { color: var(--muted); font-size: 18px; max-width: 34em; margin-bottom: 26px; }
.ip-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 12px 12px 18px; max-width: 480px; cursor: pointer; }
.ip-label { display: block; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--faint); }
.ip { font: 500 clamp(18px, 2.2vw, 22px) var(--mono); color: var(--text); word-break: break-all; }
.hero-status { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 26px; color: var(--muted); font-size: 14px; }
.hs { display: inline-flex; align-items: center; gap: 7px; }
.hs b { color: var(--text); font-family: var(--mono); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- factory toy ---------- */
.factory { margin: 0; overflow: hidden; }
.factory-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 14px; color: var(--muted); border-bottom: 2px solid #0e0b08; }
.tag { font: 700 12px var(--pixel); text-transform: uppercase; background: var(--copper); color: #200c02; padding: 3px 8px; border-radius: 3px; }
.factory-svg { display: block; width: 100%; height: auto; background: #1b1712; touch-action: manipulation; user-select: none; }
.factory-svg .clickable { cursor: pointer; }
.factory-svg .clickable:hover > rect:first-child, .factory-svg .clickable:hover > path:first-child { filter: brightness(1.25); }
.factory-svg .clickable:focus { outline: none; }
.factory-svg .clickable:focus-visible > :first-child { stroke: var(--brass-2); }
.svg-label { font: 700 11px var(--pixel); fill: #c9b892; letter-spacing: .08em; }
.svg-label.sm { font-size: 10px; fill: #9c8c70; }
.factory-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; padding: 12px 16px; border-top: 2px solid #0e0b08; }
.factory-foot b { display: block; font: 700 22px var(--pixel); color: var(--brass-2); }
.mini { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.factory-tip { flex: 1 1 200px; text-align: right; font-size: 13px; color: var(--faint); }
.ore { fill: #77706a; stroke: #2a2725; stroke-width: 2; }
.ore-dot { fill: #e0a83a; }
.coin-shape { fill: url(#brassG); stroke: #6b4a10; stroke-width: 2; }

/* ---------- sections ---------- */
.section { padding: 84px 0; border-bottom: 2px solid #000; }
.section-blue {
  background:
    linear-gradient(rgba(120, 180, 255, .07) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(120, 180, 255, .07) 1px, transparent 1px) 0 0 / 24px 24px,
    #0f2338;
}
.section-blue .eyebrow { color: #8cc4ff; }
.section-dark { background: #110e0b; }
.section-brass { background: linear-gradient(180deg, #2a1f12, #1a140d); }
.sec-head { margin-bottom: 36px; max-width: 760px; }
.sec-head h2 { font-size: clamp(30px, 4vw, 46px); text-shadow: 3px 3px 0 #000; }
.sec-sub { color: var(--muted); margin-top: 12px; font-size: 17px; }
.section-blue .sec-sub { color: #a9c3dd; }
.hint { font-size: 13px; color: var(--faint); padding: 0 16px 14px; }

/* ---------- status ---------- */
.status-grid { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.online-list { list-style: none; margin: 0; padding: 4px 10px 10px; max-height: 470px; overflow: auto; }
.online-list li { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 4px; }
.online-list li.player { cursor: pointer; }
.online-list li.player:hover, .online-list li.player:focus-visible { background: #31291f; }
.online-list li.empty { color: var(--faint); justify-content: center; padding: 26px 8px; text-align: center; }
.head { width: 36px; height: 36px; image-rendering: pixelated; border-radius: 3px; background: #3b3128; flex: none; box-shadow: 0 0 0 2px #000; }
.p-main { min-width: 0; flex: 1; }
.p-name { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.p-sub { font-size: 13px; color: var(--muted); }
.rank-tag { font: 700 11px var(--pixel); padding: 2px 6px; border-radius: 3px; border: 1px solid currentColor; letter-spacing: .03em; white-space: nowrap; }
.world-chip { font: 500 12px var(--mono); color: #cfe3ff; background: #183552; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.world-chip.war { background: #4d1a17; color: #ffc9c4; }

.stats-col { display: grid; gap: 20px; min-width: 0; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile { padding: 14px 16px 12px; position: relative; overflow: hidden; }
.tile .k { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.tile .v { font: 700 30px/1.2 var(--pixel); color: var(--text); margin-top: 4px; }
.tile .s { font-size: 12px; color: var(--muted); }
.tile .v small { font-size: 16px; color: var(--muted); }
.tile.hl .v { color: var(--brass-2); }

.chart-panel { padding-bottom: 6px; }
.chart { position: relative; height: 210px; padding: 0 12px 10px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart-empty { display: grid; place-items: center; height: 100%; color: var(--faint); font-size: 14px; }
.chart .axis { font: 500 11px var(--mono); fill: var(--faint); }
.chart .gridline { stroke: #3a3027; stroke-width: 1; }
.chart .area { fill: rgba(224, 168, 58, .18); }
.chart .line { fill: none; stroke: var(--brass); stroke-width: 2.5; stroke-linejoin: round; }
.chart .down { fill: rgba(236, 90, 79, .18); }
.chart .cursor { stroke: var(--brass-2); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .cdot { fill: var(--brass-2); stroke: #000; stroke-width: 2; }
.chart-tip { position: absolute; pointer-events: none; background: #0d0b09; border: 1px solid var(--edge-hi); padding: 6px 9px; border-radius: 4px; font-size: 13px; white-space: nowrap; transform: translate(-50%, -110%); }
.chart-tip b { font-family: var(--mono); color: var(--brass-2); }

.seg { display: inline-flex; background: #17130f; border: 2px solid #000; border-radius: 4px; padding: 2px; }
.seg button { background: none; border: 0; padding: 5px 10px; font: 600 13px var(--body); color: var(--muted); cursor: pointer; border-radius: 3px; }
.seg button.on { background: #3a3128; color: var(--text); box-shadow: inset 1px 1px 0 var(--edge-hi); }

.claims-panel { margin-top: 20px; }
.bars { display: grid; gap: 10px; padding: 4px 16px 16px; }
.bar { display: grid; grid-template-columns: 110px 1fr 70px; align-items: center; gap: 12px; font-size: 14px; }
.bar-track { height: 14px; background: #17130f; border: 2px solid #000; border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: repeating-linear-gradient(90deg, var(--brass) 0 10px, #cd942c 10px 12px); width: 0; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.bar-n { font-family: var(--mono); text-align: right; color: var(--muted); }

/* ---------- map ---------- */
.map-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.map-tab { background: #163453; color: #cfe3ff; border: 2px solid #000; border-radius: 4px; padding: 8px 14px; cursor: pointer; font: 600 14px var(--body); box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .12); display: inline-flex; gap: 8px; align-items: center; }
.map-tab:hover { background: #1d4269; }
.map-tab.on { background: var(--blue); color: #04131f; }
.map-tab .n { font: 600 11px var(--mono); background: rgba(0, 0, 0, .35); color: #fff; padding: 1px 6px; border-radius: 99px; }
.map-frame { position: relative; height: min(72vh, 720px); min-height: 380px; overflow: hidden; background: #000; border-color: #000; box-shadow: inset 2px 2px 0 #2d5c88, 0 18px 40px rgba(0, 0, 0, .4); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-load { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: #a9c3dd; font-size: 15px; }
.map-load .spin { width: 46px; height: 46px; color: var(--blue); animation: spin 3s linear infinite; }
.map-load.err { color: #ffcfc9; }
.map-tools { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; z-index: 2; }
.map-tools .btn { background: rgba(14, 30, 48, .88); color: #e2efff; }
.map-frame:fullscreen { height: 100%; border-radius: 0; }

/* ---------- worlds ---------- */
.worlds { display: grid; grid-template-columns: 220px 1fr; gap: 20px; margin-bottom: 40px; }
.world-tabs { display: flex; flex-direction: column; gap: 8px; }
.world-tab { text-align: left; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--panel); border: 2px solid #000; border-radius: 5px; cursor: pointer; font: 600 16px var(--body); color: var(--muted); box-shadow: inset 2px 2px 0 var(--edge-hi); }
.world-tab i { width: 14px; height: 14px; border-radius: 3px; flex: none; box-shadow: 0 0 0 2px #000; }
.world-tab:hover { color: var(--text); }
.world-tab.on { color: #1b1206; background: var(--brass); box-shadow: inset 2px 2px 0 var(--brass-2); }
.world-card { padding: 26px 28px; display: grid; grid-template-columns: 1fr 240px; gap: 28px; min-height: 330px; }
.world-card h3 { font-size: 30px; margin-bottom: 6px; }
.world-card .tagline { color: var(--brass-2); font-weight: 600; margin-bottom: 16px; }
.world-card ul { margin: 0; padding-left: 20px; color: var(--muted); }
.world-card li { margin: 6px 0; }
.world-facts { display: grid; gap: 8px; align-content: start; }
.fact { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; background: #1a1611; border: 1px solid #3a3027; border-radius: 4px; font-size: 14px; }
.fact span { color: var(--faint); }
.world-card .btn { margin-top: 10px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { padding: 20px; transition: transform .2s ease; }
.feature:hover { transform: translateY(-4px); }
.feature svg { width: 34px; height: 34px; color: var(--copper); margin-bottom: 12px; }
.feature h3 { font-size: 20px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }

/* ---------- ranks ---------- */
.ladder { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin-bottom: 18px; padding-top: 6px; }
.ladder::before { content: ""; position: absolute; left: 6%; right: 6%; top: 40px; height: 6px; background: repeating-linear-gradient(90deg, #4a3d2f 0 12px, #2b241c 12px 16px); border: 2px solid #000; border-radius: 3px; }
.rung { position: relative; display: grid; justify-items: center; gap: 6px; background: none; border: 0; cursor: pointer; padding: 0 2px 8px; color: var(--muted); }
.rung .gear { width: 74px; height: 74px; display: grid; place-items: center; position: relative; }
.rung .gear svg { position: absolute; inset: 0; width: 100%; height: 100%; color: #3a3128; transition: transform .6s ease, color .2s; filter: drop-shadow(2px 2px 0 #000); }
.rung .gear b { position: relative; font: 700 22px var(--pixel); color: var(--rc, #fff); text-shadow: 2px 2px 0 #000; }
.rung .rn { font: 700 14px var(--pixel); color: var(--rc, var(--text)); }
.rung .rv { font: 500 12px var(--mono); color: var(--faint); }
.rung:hover .gear svg { transform: rotate(45deg); color: #4d4134; }
.rung.on .gear svg { color: var(--rc); transform: rotate(90deg); }
.rung.on .gear b { color: #111; text-shadow: none; }
.rank-detail { padding: 22px 24px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; margin-bottom: 20px; }
.rank-detail h3 { font-size: 30px; color: var(--rc); }
.rank-detail .req { color: var(--muted); margin: 6px 0 16px; }
.big-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.big-stats div { background: #1a1611; border: 1px solid #3a3027; padding: 10px 12px; border-radius: 4px; }
.big-stats b { display: block; font: 700 22px var(--pixel); color: var(--text); }
.big-stats span { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); }
.perks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-content: start; }
.perks li { background: #1a1611; border: 1px solid #3a3027; padding: 6px 10px; border-radius: 4px; font-size: 14px; }
.perks-h { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 10px; }
.holders { margin-top: 14px; font-size: 14px; color: var(--muted); }

.lookup { padding-bottom: 16px; }
.lookup-row { display: flex; gap: 10px; padding: 0 16px; }
.lookup input { flex: 1; min-width: 0; background: #0f0d0a; border: 2px solid #000; box-shadow: inset 2px 2px 0 #000, inset -1px -1px 0 var(--edge-hi); color: var(--text); padding: 10px 12px; font: 500 16px var(--mono); border-radius: 4px; }
.lookup-out { padding: 14px 16px 0; }
.lk { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lk .head { width: 56px; height: 56px; }
.lk-main { flex: 1; min-width: 220px; }
.progress { height: 18px; background: #0f0d0a; border: 2px solid #000; border-radius: 4px; overflow: hidden; margin: 8px 0 4px; }
.progress > div { height: 100%; background: repeating-linear-gradient(45deg, var(--brass) 0 8px, #c28d2b 8px 16px); width: 0; transition: width 1s cubic-bezier(.2, .8, .2, 1); animation: belt 1s linear infinite; background-size: 22.6px 22.6px; }
.muted { color: var(--muted); }

/* ---------- vote ---------- */
.vote-sites { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
.vsite { display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-decoration: none; color: var(--text); transition: transform .15s ease; }
.vsite:hover { transform: translateY(-3px); }
.vsite .vn { font: 700 22px var(--pixel); color: var(--brass); width: 40px; height: 40px; display: grid; place-items: center; background: #17130f; border: 2px solid #000; border-radius: 4px; flex: none; }
.vsite b { display: block; font-size: 16px; }
.vsite span { font-size: 13px; color: var(--muted); }
.vsite .go { margin-left: auto; font: 700 14px var(--pixel); color: #1b1206; background: var(--brass); padding: 6px 10px; border-radius: 3px; border: 2px solid #000; }
.vsite.voted .go { background: var(--green); }
.vote-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 10px; padding: 10px 16px 0; }
.pod { display: grid; justify-items: center; text-align: center; gap: 6px; }
.pod img.body { height: 110px; width: auto; image-rendering: pixelated; filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, .6)); }
.pod.p1 img.body { height: 140px; }
.pod .pn { font-weight: 600; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .block { width: 100%; display: grid; place-items: center; font: 700 26px var(--pixel); color: #1b1206; border: 2px solid #000; border-radius: 4px 4px 0 0; box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .35); }
.pod.p1 .block { height: 86px; background: linear-gradient(#f5cc66, #c58a25); }
.pod.p2 .block { height: 64px; background: linear-gradient(#d9dedb, #8e9590); }
.pod.p3 .block { height: 48px; background: linear-gradient(#e59565, #a8562b); }
.pod .pv { font: 500 13px var(--mono); color: var(--muted); }
.board-list { list-style: none; margin: 0; padding: 12px 10px 6px; counter-reset: b 3; }
.board-list li { display: grid; grid-template-columns: 34px 32px 1fr auto; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 4px; }
.board-list li:nth-child(odd) { background: #1f1a14; }
.board-list .pos { font: 700 15px var(--pixel); color: var(--faint); text-align: right; }
.board-list .head { width: 32px; height: 32px; }
.board-list .bv { font: 600 15px var(--mono); color: var(--brass-2); }
.board-empty { padding: 30px 16px; text-align: center; color: var(--faint); }
.more { margin: 0 16px 16px; }
.side-col { display: grid; gap: 20px; }
.recent-list { list-style: none; margin: 0; padding: 0 12px 12px; }
.recent-list li { display: flex; align-items: center; gap: 10px; padding: 7px 4px; font-size: 14px; border-bottom: 1px dashed #3a3027; }
.recent-list li:last-child { border-bottom: 0; }
.recent-list .head { width: 26px; height: 26px; }
.recent-list time { margin-left: auto; color: var(--faint); font: 500 12px var(--mono); }
.vote-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.vote-stats div { background: #1a1611; border: 1px solid #3a3027; border-radius: 4px; padding: 10px 12px; }
.vote-stats b { display: block; font: 700 24px var(--pixel); color: var(--brass-2); }
.vote-stats span { font: 600 11px var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- join ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { padding: 26px 22px 22px; position: relative; display: grid; gap: 12px; align-content: start; }
.step-n { position: absolute; top: -18px; left: 18px; width: 40px; height: 40px; display: grid; place-items: center; font: 700 22px var(--pixel); background: var(--brass); color: #1b1206; border: 2px solid #000; border-radius: 4px; box-shadow: inset 2px 2px 0 var(--brass-2); }
.step h3 { font-size: 22px; margin-top: 8px; }
.step p { color: var(--muted); }
.step .btn { justify-self: start; }

/* ---------- footer ---------- */
.footer { padding: 54px 0 70px; background: #0e0c09; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.foot-grid h4 { font-size: 16px; color: var(--brass); margin-bottom: 12px; }
.foot-grid a:not(.brand):not(.btn) { display: block; color: var(--muted); text-decoration: none; padding: 4px 0; font-size: 15px; }
.foot-grid a:not(.brand):not(.btn):hover { color: var(--text); }
.foot-note { color: var(--faint); font-size: 13px; margin: 12px 0 14px; max-width: 30em; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 140%); opacity: 0; visibility: hidden; background: var(--brass); color: #1b1206; font: 700 15px var(--pixel); padding: 10px 18px; border: 2px solid #000; border-radius: 4px; box-shadow: inset 2px 2px 0 var(--brass-2), 0 10px 30px rgba(0, 0, 0, .5); transition: transform .3s cubic-bezier(.2, .9, .3, 1.3), opacity .2s, visibility .3s; z-index: 80; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(107, 220, 107, 0); } }
@keyframes belt { to { background-position: 22.6px 0; } }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .hero-grid { grid-template-columns: 1fr; }
  .status-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .vote-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: #15120e; border-bottom: 2px solid #000; padding: 8px 16px 14px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav { gap: 12px; }
  .nav-pill { display: none; }
  .brand { margin-right: auto; }
  .worlds { grid-template-columns: 1fr; }
  .world-tabs { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .world-tab { flex: none; }
  .world-card { grid-template-columns: 1fr; padding: 20px; }
  .ladder { grid-template-columns: repeat(4, 1fr); row-gap: 14px; }
  .ladder::before { display: none; }
  .rank-detail { grid-template-columns: 1fr; }
  .vote-sites { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 520px) {
  .section { padding: 60px 0; }
  .hero { padding: 40px 0 54px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile .v { font-size: 24px; }
  .features { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .btn-discord.sm span { display: none; }
  .bar { grid-template-columns: 80px 1fr 50px; }
  .ip-box { padding-left: 14px; }
  .ip { font-size: 17px; white-space: nowrap; word-break: normal; }
  #copyIp span { display: none; }
  #copyIp { padding: 0 12px; }
  .rung .gear { width: 60px; height: 60px; }
  .factory-tip { text-align: left; }
}

/* ---------- chat + discord ---------- */
.comm-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 20px; align-items: stretch; }
.chat-panel, .discord-panel { display: flex; flex-direction: column; min-width: 0; height: 640px; }
.live-tag { display: inline-flex; align-items: center; gap: 6px; }
.live-tag.up .dot { background: var(--green); box-shadow: 0 0 0 3px rgba(107, 220, 107, .2); animation: pulse 2s ease-in-out infinite; }
.mc-chat-wrap { position: relative; flex: 1; min-height: 0; margin: 0 12px; }
.mc-chat {
  position: absolute; inset: 0; overflow-y: auto; padding: 10px 12px;
  background: rgba(0, 0, 0, .55); border: 2px solid #000; border-radius: 3px;
  font: 400 16px/1.45 var(--pixel); color: #fff; text-shadow: 2px 2px 0 #3f3f3f;
  overscroll-behavior: contain;
}
.mc-line { padding: 1px 0; overflow-wrap: anywhere; }
.mc-line time { color: #8d8d8d; font: 500 11px var(--mono); text-shadow: none; margin-right: 6px; vertical-align: 1px; }
.mc-line .mc-tag { margin-right: 4px; }
.mc-line.ev { color: #ffff55; }
.mc-line.adv .adv-name { color: #55ff55; }
.mc-line.vote { color: #ffaa00; }
.mc-line.death { color: #d0d0d0; }
.mc-line.sys { color: #aaaaaa; font-style: italic; }
.mc-line .dc-tag { color: #8b95ff; }
.mc-chat .empty { color: #aaa; text-align: center; padding: 40px 10px; }
.mc-day { text-align: center; color: #8d8d8d; font: 500 11px var(--mono); text-shadow: none; margin: 8px 0 4px; letter-spacing: .1em; text-transform: uppercase; }
.chat-new { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: var(--brass); color: #1b1206; border: 2px solid #000; border-radius: 99px; padding: 4px 12px; font: 600 13px var(--body); cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .5); }
.chat-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px 14px; font-size: 13px; color: var(--muted); }
.ro { display: inline-flex; align-items: center; gap: 6px; }
.ro svg { width: 14px; height: 14px; }
.tgl { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.chat-toggles { display: inline-flex; flex-wrap: wrap; gap: 6px 16px; }
.tgl input, .wl-agree input { accent-color: var(--brass); width: 16px; height: 16px; }

.discord-panel { background: #2b2d31; border-color: #111214; box-shadow: inset 2px 2px 0 #3f4248, 0 10px 30px rgba(0, 0, 0, .25); overflow: hidden; }
.dc-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #1f2023; }
.dc-icon { width: 36px; height: 36px; border-radius: 50%; }
.dc-title { flex: 1; min-width: 0; display: grid; }
.dc-title b { font: 700 17px var(--body); color: #f2f3f5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-title span { font-size: 12px; color: #b5bac1; }
.dc-title span i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #23a55a; margin: 0 4px 0 10px; }
.dc-title span i.gray { background: #80848e; margin-left: 0; }
.dc-tabs { display: flex; gap: 2px; padding: 8px 8px 0; overflow-x: auto; scrollbar-width: thin; flex: none; }
.dc-tab { background: none; border: 0; color: #949ba4; padding: 8px 10px; border-radius: 4px 4px 0 0; cursor: pointer; font: 600 14px var(--body); white-space: nowrap; display: inline-flex; gap: 5px; align-items: center; }
.dc-tab svg { width: 16px; height: 16px; opacity: .8; }
.dc-tab:hover { color: #dbdee1; background: #35373c; }
.dc-tab.on { color: #fff; background: #313338; }
.dc-topic { background: #313338; color: #b5bac1; font-size: 13px; padding: 8px 16px 6px; border-bottom: 1px solid #26282c; flex: none; }
.dc-topic:empty { display: none; }
.dc-msgs { flex: 1; min-height: 0; overflow-y: auto; background: #313338; padding: 6px 0 14px; color: #dbdee1; font: 400 15px/1.375 var(--body); overscroll-behavior: contain; }
.dc-empty { color: #949ba4; text-align: center; padding: 50px 20px; }
.dc-empty .btn { margin-top: 14px; }
.dc-msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 14px; padding: 8px 16px 4px; }
.dc-msg:hover { background: #2e3035; }
.dc-msg.cont { padding-top: 1px; }
.dc-msg.cont .dc-av { visibility: hidden; height: 0; }
.dc-msg.cont .dc-meta { display: none; }
.dc-av { width: 40px; height: 40px; border-radius: 50%; grid-row: span 2; }
.dc-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dc-author { font-weight: 600; color: #f2f3f5; }
.dc-bot { background: #5865f2; color: #fff; font: 600 10px var(--body); padding: 1px 4px; border-radius: 3px; text-transform: uppercase; }
.dc-time { font-size: 12px; color: #949ba4; }
.dc-body { min-width: 0; overflow-wrap: anywhere; }
.dc-body a { color: #00a8fc; text-decoration: none; }
.dc-body a:hover { text-decoration: underline; }
.dc-body .h1, .dc-body .h2, .dc-body .h3 { display: block; font-weight: 700; color: #f2f3f5; margin: 8px 0 2px; line-height: 1.25; }
.dc-body .h1 { font-size: 22px; } .dc-body .h2 { font-size: 19px; } .dc-body .h3 { font-size: 16px; }
.dc-body .sub { display: block; font-size: 12px; color: #949ba4; }
.dc-body .quote { display: block; padding-left: 12px; border-left: 4px solid #4e5058; }
.dc-body code { background: #2b2d31; border-radius: 3px; padding: 1px 4px; font: 13px var(--mono); }
.dc-body pre { background: #2b2d31; border: 1px solid #1e1f22; border-radius: 4px; padding: 8px; overflow-x: auto; margin: 4px 0; white-space: pre-wrap; }
.dc-body pre code { background: none; padding: 0; }
.dc-body .li { display: block; padding-left: 18px; position: relative; }
.dc-body .li::before { content: "\2022"; position: absolute; left: 5px; }
.dc-body .mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.dc-body .spoiler { background: #1e1f22; color: transparent; border-radius: 3px; cursor: pointer; }
.dc-body .spoiler.shown { background: rgba(255, 255, 255, .1); color: inherit; }
.dc-body .emoji { width: 22px; height: 22px; vertical-align: -5px; object-fit: contain; }
.dc-body .edited { font-size: 10px; color: #949ba4; margin-left: 4px; }
.dc-att { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.dc-att img { max-width: min(100%, 420px); max-height: 300px; border-radius: 6px; cursor: zoom-in; background: #2b2d31; }
.dc-file { display: inline-flex; gap: 8px; align-items: center; background: #2b2d31; border: 1px solid #1e1f22; border-radius: 6px; padding: 8px 12px; font-size: 14px; }
.dc-embed { margin-top: 6px; max-width: 520px; background: #2b2d31; border-left: 4px solid #1e1f22; border-radius: 4px; padding: 8px 14px 12px 12px; display: grid; gap: 4px; font-size: 14px; overflow: hidden; }
.dc-embed .e-title { font-weight: 600; color: #fff; }
.dc-embed .e-author { font-size: 13px; font-weight: 600; color: #f2f3f5; }
.dc-embed .e-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px 12px; }
.dc-embed .e-field b { display: block; font-size: 13px; color: #f2f3f5; }
.dc-embed .e-field.full { grid-column: 1 / -1; }
.dc-embed img.e-img { max-width: 100%; border-radius: 4px; margin-top: 6px; cursor: zoom-in; }
.dc-embed img.e-thumb { float: right; max-width: 80px; border-radius: 4px; margin-left: 10px; }
.dc-embed .e-foot { font-size: 12px; color: #949ba4; }
.dc-open { display: block; text-align: center; font-size: 13px; color: #949ba4; padding: 12px 10px 0; }
.dc-open a { color: #00a8fc; }

.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .85); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; }

/* ---------- whitelist form ---------- */
.steps { grid-template-columns: 1fr 1.35fr 1fr; }
.wl-form { display: grid; gap: 10px; margin-top: 10px; }
.wl-row { display: flex; gap: 10px; align-items: center; }
.wl-row .head { width: 40px; height: 40px; }
.wl-row input { flex: 1; min-width: 0; background: #0f0d0a; border: 2px solid #000; box-shadow: inset 2px 2px 0 #000, inset -1px -1px 0 var(--edge-hi); color: var(--text); padding: 10px 12px; font: 500 16px var(--mono); border-radius: 4px; }
.wl-row input[aria-invalid="true"] { border-color: var(--red); }
.wl-agree { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); cursor: pointer; }
.wl-form .btn { justify-self: start; }
.wl-form .btn[disabled] { opacity: .6; cursor: progress; }
.wl-msg { font-size: 14px; min-height: 1.4em; }
.wl-msg.ok { color: var(--green); }
.wl-msg.err { color: #ff9a8f; }
.wl-alt { font-size: 13px; color: var(--faint); margin-top: 10px; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 1060px) {
  .comm-grid { grid-template-columns: 1fr; }
  .chat-panel { height: 480px; }
  .discord-panel { height: 620px; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .mc-chat { font-size: 14px; }
  .dc-msg { grid-template-columns: 32px minmax(0, 1fr); gap: 0 10px; padding: 8px 10px 4px; }
  .dc-av { width: 32px; height: 32px; }
}

/* ---------- pages: one document, one visible page per URL ---------- */
html.js .page { display: none; }
html[data-route="home"] .page[data-page="home"],
html[data-route="status"] .page[data-page="status"],
html[data-route="map"] .page[data-page="map"],
html[data-route="chat"] .page[data-page="chat"],
html[data-route="worlds"] .page[data-page="worlds"],
html[data-route="ranks"] .page[data-page="ranks"],
html[data-route="vote"] .page[data-page="vote"],
html[data-route="join"] .page[data-page="join"],
html[data-route="links"] .page[data-page="links"],
html[data-route="updates"] .page[data-page="updates"],
html[data-route="notfound"] .page[data-page="notfound"] { display: block; }
main { min-height: calc(100vh - 64px); }
html:not([data-route="home"]) main > .page:first-of-type { padding-top: 56px; }
main.page-in > .page { animation: pageIn .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.nav-links a.active { color: var(--brass-2); background: #2c251d; box-shadow: inset 0 -2px 0 var(--brass); }
.nav { gap: 18px; }
.nav-links a { padding: 8px 10px; }

/* ---------- opening animation ---------- */
.intro { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; pointer-events: none; }
html.no-intro .intro, html.intro-done .intro { display: none; }
html.intro-on:not(.intro-done) body { overflow: hidden; }
.intro .door { position: absolute; left: 0; right: 0; height: 50.5%; background:
    linear-gradient(rgba(224, 168, 58, .06) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(224, 168, 58, .06) 1px, transparent 1px) 0 0 / 32px 32px, #0d0b08;
  pointer-events: auto; animation: doorTop .7s cubic-bezier(.7, 0, .3, 1) 2.15s forwards; }
.intro .door.top { top: 0; border-bottom: 3px solid #000; box-shadow: inset 0 -6px 0 #2a2118; }
.intro .door.bottom { bottom: 0; border-top: 3px solid #000; box-shadow: inset 0 6px 0 #2a2118; animation-name: doorBottom; }
.intro .door.top::after, .intro .door.bottom::after { content: ""; position: absolute; left: 0; right: 0; height: 10px;
  background: repeating-linear-gradient(-45deg, var(--brass) 0 14px, #1b1206 14px 28px); opacity: .22; }
.intro .door.top::after { bottom: 3px; }
.intro .door.bottom::after { top: 3px; }
@keyframes doorTop { to { transform: translateY(-101%); } }
@keyframes doorBottom { to { transform: translateY(101%); } }
.intro-core { position: relative; z-index: 2; display: grid; justify-items: center; gap: 18px; animation: coreOut .35s ease-in 1.95s forwards; }
@keyframes coreOut { to { opacity: 0; transform: scale(.94); } }
.intro-cogs { position: relative; width: 150px; height: 120px; }
.intro-cogs .ic { position: absolute; color: var(--brass); filter: drop-shadow(0 0 18px rgba(224, 168, 58, .45)) drop-shadow(3px 3px 0 #000); }
.intro-cogs .big { width: 104px; left: 0; top: 8px; animation: cogIn .5s cubic-bezier(.3, 1.5, .5, 1) both, spinUp 2.2s cubic-bezier(.5, 0, .2, 1) .2s both; }
.intro-cogs .small { width: 58px; left: 92px; top: 0; color: var(--andesite); animation: cogIn .5s cubic-bezier(.3, 1.5, .5, 1) .12s both, spinBack 2.2s cubic-bezier(.5, 0, .2, 1) .2s both; }
@keyframes cogIn { from { opacity: 0; transform: scale(.3); } }
@keyframes spinUp { from { rotate: 0deg; } to { rotate: 900deg; } }
@keyframes spinBack { from { rotate: 22deg; } to { rotate: -1584deg; } }
.intro-word { font: 700 clamp(32px, 7vw, 64px) var(--pixel); color: var(--text); letter-spacing: .02em; text-shadow: 4px 4px 0 #000; white-space: nowrap; }
.intro-word b { color: var(--brass); font-weight: 700; }
.intro-word span { display: inline-block; animation: letterDrop .45s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(.35s + var(--i) * .055s); }
@keyframes letterDrop { from { opacity: 0; transform: translateY(-38px) rotate(-8deg); } }
.intro-belt { width: min(320px, 70vw); height: 16px; background: #17130f; border: 2px solid #000; border-radius: 4px; overflow: hidden; box-shadow: inset 0 2px 0 #000; }
.intro-belt span { display: block; height: 100%; width: 0; background: repeating-linear-gradient(-45deg, var(--brass) 0 8px, #b97f22 8px 16px); animation: beltFill 1.5s cubic-bezier(.4, 0, .2, 1) .45s forwards, belt .6s linear infinite; background-size: 22.6px 22.6px; }
@keyframes beltFill { to { width: 100%; } }
.intro-cap { font: 500 13px var(--mono); color: var(--faint); letter-spacing: .12em; text-transform: uppercase; animation: letterDrop .4s ease .6s both; }
.intro-skip { position: absolute; z-index: 3; right: 20px; bottom: 20px; pointer-events: auto; background: none; border: 1px solid #3a3027; color: var(--muted); padding: 6px 12px; border-radius: 4px; cursor: pointer; font: 500 13px var(--body); animation: coreOut .2s ease-in 1.95s forwards; }
.intro-skip:hover { color: var(--text); border-color: var(--muted); }
html.intro-skip .intro .door, html.intro-skip .intro-core, html.intro-skip .intro-skip { animation-delay: 0s !important; animation-duration: .35s !important; }
html.intro-on main .hero h1, html.intro-on .hero .lede, html.intro-on .hero .factory { animation: heroIn .7s cubic-bezier(.2, .8, .2, 1) 2.45s both; }
html.intro-on .hero .lede { animation-delay: 2.55s; }
html.intro-on .hero .factory { animation-delay: 2.6s; }
html.intro-skip.intro-on main .hero h1, html.intro-skip.intro-on .hero .lede, html.intro-skip.intro-on .hero .factory { animation-delay: .3s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(22px); } }

/* ---------- home ---------- */
.home-more { padding-top: 40px; }
.home-strip { display: grid; grid-template-columns: repeat(5, 1fr); margin: -88px 0 64px; position: relative; z-index: 2; overflow: hidden; }
.hstat { padding: 16px 18px; text-decoration: none; color: var(--text); border-right: 2px solid #120f0b; transition: background .15s; min-width: 0; }
.hstat:last-child { border-right: 0; }
.hstat:hover { background: #2d261e; }
.hstat .k { display: block; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.hstat b { display: block; font: 700 22px var(--pixel); color: var(--brass-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.explore { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 48px; }
.ex-card { display: grid; gap: 6px; align-content: start; padding: 20px; text-decoration: none; color: var(--text); position: relative; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.ex-card::after { content: "\2192"; position: absolute; right: 16px; top: 16px; font: 700 20px var(--pixel); color: var(--faint); transition: transform .18s, color .18s; }
.ex-card:hover { transform: translateY(-4px); box-shadow: inset 2px 2px 0 var(--edge-hi), inset -2px -2px 0 rgba(0, 0, 0, .45), 0 16px 34px rgba(0, 0, 0, .4); }
.ex-card:hover::after { transform: translateX(4px); color: var(--brass); }
.ex-card svg { width: 30px; height: 30px; color: var(--copper); }
.ex-card:hover svg { color: var(--brass); }
.ex-card h3 { font-size: 21px; }
.ex-card p { color: var(--muted); font-size: 14px; }
.ex-live { font: 500 12px var(--mono); color: var(--green); min-height: 1.2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: start; }
.home-grid .features { grid-template-columns: 1fr 1fr; }
.news { overflow: hidden; }
.more-link { font: 600 13px var(--body); color: var(--brass-2); text-decoration: none; }
.news-body { background: #313338; color: #dbdee1; margin: 0 12px 12px; border-radius: 4px; border: 2px solid #111214; max-height: 460px; overflow: auto; padding-bottom: 8px; font: 400 15px/1.375 var(--body); }
.news-ch { font: 600 12px var(--mono); color: #949ba4; padding: 10px 16px 0; }

/* ---------- links ---------- */
.link-group { margin-bottom: 36px; }
.link-group h3 { font-size: 22px; color: var(--brass); margin-bottom: 14px; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.lcard { display: flex; align-items: center; gap: 14px; padding: 16px; text-decoration: none; color: var(--text); text-align: left; font: inherit; cursor: pointer; transition: transform .15s ease; min-width: 0; }
.lcard:hover { transform: translateY(-3px); }
.lc-ic { width: 46px; height: 46px; flex: none; display: grid; place-items: center; background: #17130f; border: 2px solid #000; border-radius: 6px; color: var(--brass); }
.lc-ic.dc { background: var(--discord); color: #fff; }
.lc-ic svg { width: 24px; height: 24px; }
.lc-t { display: grid; min-width: 0; }
.lc-t b { font-size: 16px; }
.lc-t small { font-size: 13px; color: var(--muted); }
.lc-t em { font: 500 12px var(--mono); font-style: normal; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcard.voted .lc-ic { color: var(--green); }

/* ---------- vote sites: any number of them ---------- */
.vote-sites { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ---------- not found ---------- */
.nf { text-align: center; display: grid; justify-items: center; gap: 14px; padding: 60px 0; }
.nf-cog { width: 120px; color: #3a3128; animation: spin 8s linear infinite; }
.nf h2 { font-size: clamp(28px, 4vw, 42px); }

/* ---------- footer bottom ---------- */
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid #2a231b; font-size: 13px; color: var(--faint); }
.footer { padding-bottom: 32px; }

@media (max-width: 1060px) {
  .explore { grid-template-columns: repeat(2, 1fr); }
  .home-grid { grid-template-columns: 1fr; }
  .home-strip { grid-template-columns: repeat(3, 1fr); margin-top: -60px; }
  .hstat:nth-child(3) { border-right: 0; }
  .hstat:nth-child(n+4) { border-top: 2px solid #120f0b; }
}
@media (max-width: 860px) {
  .nav-links a.active { box-shadow: inset 3px 0 0 var(--brass); }
}
@media (max-width: 520px) {
  .explore { grid-template-columns: 1fr; }
  .home-grid .features { grid-template-columns: 1fr; }
  .home-strip { grid-template-columns: 1fr 1fr; margin-top: -40px; }
  .hstat { border-right: 0 !important; border-top: 2px solid #120f0b; }
  .hstat:nth-child(-n+2) { border-top: 0; }
  .hstat:nth-child(odd) { border-right: 2px solid #120f0b !important; }
  .hstat:last-child { grid-column: 1 / -1; border-right: 0 !important; }
  .intro-cogs { transform: scale(.8); }
}
@media (prefers-reduced-motion: reduce) {
  .intro { display: none !important; }
}

/* ---------- map preview (BlueMap opens in a new tab) ---------- */
.map-frame { display: grid; place-items: center; background: #0b1a2a; }
.map-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: auto; filter: saturate(1.05); transition: opacity .3s; }
.map-frame.no-preview { background: radial-gradient(circle at 50% 40%, #1d4269, #0b1a2a 70%); }
.map-overlay { position: relative; z-index: 1; display: grid; justify-items: center; gap: 12px; text-align: center; padding: 26px 30px; margin: 16px;
  background: rgba(8, 18, 30, .78); border: 2px solid #000; border-radius: 8px; box-shadow: inset 2px 2px 0 #2d5c88, 0 18px 40px rgba(0, 0, 0, .45); backdrop-filter: blur(4px); max-width: 520px; }
.map-world b { display: block; font: 700 30px var(--pixel); color: #fff; text-shadow: 2px 2px 0 #000; }
.map-world span { display: block; color: #a9c3dd; font-size: 14px; margin-top: 4px; }
.map-note { color: #a9c3dd; font-size: 13px; }

/* ---------- layout v2: sub headings, gallery, cards ---------- */
.sub-head { margin: 52px 0 18px; }
.sub-head .h3, h2.h3 { font-size: clamp(22px, 2.6vw, 30px); text-shadow: 2px 2px 0 #000; }
.explore { grid-template-columns: repeat(3, 1fr); }
#join .steps { margin-top: 10px; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.shot { position: relative; padding: 0; border: 2px solid #000; border-radius: 6px; overflow: hidden; cursor: zoom-in; background: #000; aspect-ratio: 16 / 9;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35); transition: transform .18s ease, box-shadow .18s ease; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.shot span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font: 600 13px var(--body); color: #fff; text-align: left;
  background: linear-gradient(transparent, rgba(0, 0, 0, .8)); opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.shot:hover, .shot:focus-visible { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(0, 0, 0, .5); }
.shot:hover img { transform: scale(1.05); }
.shot:hover span, .shot:focus-visible span { opacity: 1; transform: none; }
.gallery-more { text-align: center; margin-top: 22px; }
.world-gallery { margin-top: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.world-gallery:empty { display: none; }

.shots-box figure { margin: 0; display: grid; gap: 10px; justify-items: center; max-width: min(1280px, 100%); }
.shots-box img { max-height: calc(100vh - 120px); border: 2px solid #000; }
.shots-box figcaption { color: #eee; font: 600 15px var(--body); }
.lb-btn { position: absolute; background: rgba(20, 16, 12, .8); color: #fff; border: 2px solid #000; border-radius: 6px; width: 48px; height: 48px; font-size: 28px; line-height: 1; cursor: pointer; }
.lb-btn:hover { background: var(--brass); color: #1b1206; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 16px; top: 16px; font-size: 20px; }

/* map page */
.world-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.wcard { display: grid; text-decoration: none; color: var(--text); overflow: hidden; padding: 0; transition: transform .15s ease; background: #102539; border-color: #000; }
.wcard:hover { transform: translateY(-3px); }
.wcard img, .wcard-blank { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: radial-gradient(circle, #1d4269, #0b1a2a); }
.wcard-t { display: grid; padding: 10px 14px 12px; gap: 2px; }
.wcard-t b { font: 700 18px var(--pixel); }
.wcard-t small { color: #a9c3dd; font-size: 13px; }
.wcard-t em { font-style: normal; color: #8cc4ff; font-size: 13px; font-weight: 600; }
.map-help { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.help-card { padding: 18px 20px; display: grid; gap: 8px; align-content: start; }
.help-card h3 { font-size: 19px; color: var(--brass-2); }
.help-card p, .help-card li { color: var(--muted); font-size: 15px; }
.help-card ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.help-card .btn { justify-self: start; margin-top: 4px; }
.section-blue .help-card { background: #12283d; border-color: #000; box-shadow: inset 2px 2px 0 #2d5c88; }
.section-blue .help-card h3 { color: #8cc4ff; }
.section-blue .help-card p, .section-blue .help-card li { color: #b9cfe4; }
code { font: 500 .92em var(--mono); background: #17130f; border: 1px solid #3a3027; border-radius: 3px; padding: 1px 5px; color: var(--brass-2); }
.cmd code { margin-right: 6px; }

/* chat page */
.chat-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.chat-big { height: 720px; }
.chat-side { display: grid; gap: 16px; }
.today { padding-bottom: 12px; }
.today-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 14px; }
.today-tiles div { background: #1a1611; border: 1px solid #3a3027; border-radius: 4px; padding: 8px 10px; }
.today-tiles b { display: block; font: 700 22px var(--pixel); color: var(--brass-2); }
.today-tiles span { font: 600 11px var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.active-list, .adv-list { list-style: none; margin: 0; padding: 0 14px; display: grid; gap: 6px; }
.active-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.active-list .head { width: 26px; height: 26px; }
.active-list b { margin-left: auto; font: 600 13px var(--mono); color: var(--brass-2); }
.adv-list li { font-size: 13px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.adv-who { color: var(--text); font-weight: 600; }
.adv-what { color: #6bdc6b; }
.adv-list time { margin-left: auto; font: 500 11px var(--mono); color: var(--faint); }
.chat-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.dc-tag-inline { color: #8b95ff; font-weight: 600; }

/* updates page */
.upd-top { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.upd-feature { background: #313338; border-color: #111214; box-shadow: inset 2px 2px 0 #3f4248; color: #dbdee1; padding: 6px 0 4px; overflow: hidden; }
.upd-feature .news-ch { padding: 12px 16px 2px; color: #b5bac1; }
.upd-msg { font: 400 15px/1.45 var(--body); color: #dbdee1; }
.upd-msg .dc-msg { padding: 10px 16px 6px; }
.upd-msg .dc-msg:hover { background: none; }
.upd-side { display: grid; gap: 16px; }
.upd-pack { padding: 18px 20px; display: grid; gap: 6px; justify-items: start; }
.upd-pack .k { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.upd-pack b { font: 700 24px var(--pixel); color: var(--brass-2); line-height: 1.15; }
.upd-pack span:not(.k) { color: var(--muted); font-size: 13px; }
.upd-pack .btn { margin-top: 6px; }
.upd-discord { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: #2b2d31; border-color: #111214; box-shadow: inset 2px 2px 0 #3f4248; }
.upd-discord .dc-icon { width: 48px; height: 48px; }
.upd-discord div { flex: 1; display: grid; min-width: 0; }
.upd-discord b { color: #f2f3f5; font-size: 17px; }
.upd-discord span { color: #b5bac1; font-size: 13px; }
.upd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.upd-card { background: #313338; border-color: #111214; box-shadow: inset 2px 2px 0 #3f4248; overflow: hidden; max-height: 420px; overflow-y: auto; }
.upd-cards .dc-empty, .upd-feature .dc-empty { color: #949ba4; }
.discord-wide { height: 760px; }

/* worlds page */
.table-wrap { overflow-x: auto; padding: 4px; }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #3a3027; white-space: nowrap; }
.compare th { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.compare tbody tr:hover { background: #2a231b; }

/* links: FAQ */
.faq { display: grid; gap: 10px; }
.faq details { padding: 0; }
.faq summary { cursor: pointer; padding: 14px 18px; font: 600 16px var(--body); list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 700 20px var(--pixel); color: var(--brass); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 18px 16px; color: var(--muted); }

@media (max-width: 1060px) {
  .gallery, .world-cards { grid-template-columns: repeat(2, 1fr); }
  .chat-grid, .upd-top { grid-template-columns: 1fr; }
  .map-help, .chat-info { grid-template-columns: 1fr; }
  .chat-big { height: 560px; }
  .explore { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .gallery, .world-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .shot span { opacity: 1; transform: none; font-size: 11px; padding: 14px 6px 5px; }
  .explore { grid-template-columns: 1fr; }
  .discord-wide { height: 620px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
}

/* ---------- top banner: the community photo ---------- */
.top-banner { position: relative; height: clamp(300px, 56vh, 620px); overflow: hidden; border-bottom: 2px solid #000; background: #0d0b08; }
.top-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; image-rendering: pixelated; }
.banner-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 11, 8, .15) 0%, rgba(13, 11, 8, 0) 40%, rgba(13, 11, 8, .82) 100%); }
.banner-copy { position: absolute; left: 0; right: 0; bottom: 26px; margin: 0 auto; }
.banner-copy h2 { font-size: clamp(24px, 3.6vw, 42px); text-shadow: 3px 3px 0 #000; margin-bottom: 14px; }
.banner-copy .eyebrow { margin-bottom: 8px; text-shadow: 2px 2px 0 #000; }
.banner-cta { display: flex; flex-wrap: wrap; gap: 10px; }
html:not([data-route="home"]) .top-banner { display: none !important; }
@media (max-width: 520px) {
  .top-banner { height: 300px; }
  .banner-copy { bottom: 16px; }
}

/* ---------- embedded BlueMap (when ce-map-embed is set) ---------- */
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 1; }
.map-frame.embedded .map-preview, .map-frame.embedded .map-overlay { display: none; }
.map-frame.embedded .map-tools { z-index: 2; }

/* =====================================================================
   v3: materials from Create (andesite casing, brass, copper), calmer
   ===================================================================== */
:root {
  --bg: #2b2e2d;
  --bg-2: #313433;
  --panel: #3a3d3c;
  --panel-2: #434745;
  --edge-hi: #5c615f;
  --edge-lo: #1c1e1d;
  --grid: rgba(255, 255, 255, .035);
  --text: #eceae4;
  --muted: #c0c1ba;
  --faint: #959891;
  --brass: #d9a441;
  --brass-2: #efc25f;
  --brass-dk: #8f6219;
  --copper: #c8743f;
  --radius: 3px;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Atkinson Hyperlegible", system-ui, sans-serif;
}
body { font-size: 17px; line-height: 1.6; }
.eyebrow { display: none; }

/* labels: plain sentence case, no tracking, no typewriter face */
.tile .k, .hstat .k, .ip-label, .mini, .perks-h, .big-stats span, .vote-stats span, .today-tiles span, .upd-pack .k,
.compare th, .count, .rung .rv, .pod .pv, .board-list .bv, .chart .axis, .mc-line time, .mc-day, .recent-list time, .adv-list time,
.lc-t em, .dc-time, .news-ch, .live-tag {
  font-family: var(--body); text-transform: none; letter-spacing: 0;
}
.tile .k, .hstat .k, .ip-label, .mini, .perks-h, .upd-pack .k, .compare th { font-size: 14px; font-weight: 700; color: var(--faint); }
.big-stats span, .vote-stats span, .today-tiles span { font-size: 13px; }
.mc-day { font-size: 12px; }

/* one motion moment (the intro) + the factory toy; nothing else drifts, spins or floats */
.reveal, .reveal.in { opacity: 1 !important; transform: none !important; transition: none !important; }
main.page-in > .page { animation: none; }
.brand-cog, .hero-bg, .bg-cog { animation: none; }
.hero-bg { display: none; }
.feature:hover, .ex-card:hover, .vsite:hover, .lcard:hover, .wcard:hover, .shot:hover, .shot:focus-visible { transform: none; }
.shot:hover img { transform: none; }
.lcard:hover, .vsite:hover, .wcard:hover, .shot:hover { border-color: var(--brass); }

/* surfaces */
body, .hero { background: var(--bg); }
.hero { padding: 54px 0 70px; }
.section-dark { background: #262928; }
.section-brass { background: #3a2c23; border-top: 4px solid var(--copper); }
.panel { box-shadow: inset 2px 2px 0 var(--edge-hi), inset -2px -2px 0 rgba(0, 0, 0, .35); }
.btn { border-radius: 2px; }
.btn-brass { background: var(--brass); color: #22170a; }
.btn-brass:hover { background: var(--brass-2); filter: none; }
.btn-ghost { background: #4a4e4c; border-color: #1c1e1d; }
.nav { background: rgba(43, 46, 45, .94); }
.footer { background: #232625; }
h1, h2, h3 { letter-spacing: 0; }

/* the photo is the hero */
.top-banner { height: clamp(380px, 70vh, 720px); }
.banner-shade { background: linear-gradient(180deg, rgba(20, 22, 21, 0) 35%, rgba(20, 22, 21, .88) 100%); }
.banner-copy h1 { font-size: clamp(36px, 5.6vw, 72px); line-height: 1.02; text-shadow: 4px 4px 0 #000; margin-bottom: 10px; max-width: 14ch; }
.banner-sub { font-size: clamp(16px, 1.6vw, 20px); color: #e4e2da; text-shadow: 2px 2px 0 #000; margin-bottom: 18px; max-width: 46ch; }
.banner-cta { align-items: stretch; }
.banner-cta .ip-box { margin: 0; background: rgba(28, 30, 29, .9); }
.hero-h { font-size: clamp(26px, 3vw, 36px); margin-bottom: 14px; }
.hero .lede { font-size: 19px; max-width: 34em; }

/* what you'll be doing */
.doing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.doing-grid h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 18px; }
.doing { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 14px 22px; }
.doing dt { font: 700 20px var(--pixel); color: var(--brass-2); padding-top: 2px; }
.doing dd { margin: 0; color: var(--muted); max-width: 46ch; }
.doing-links { margin-top: 22px; color: var(--muted); }
.doing-links a { color: var(--brass-2); }
.sec-head h2 { margin-bottom: 4px; }
.sec-sub { max-width: 60ch; }
.gallery-more { text-align: left; }

@media (max-width: 1060px) {
  .doing-grid { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 520px) {
  .top-banner { height: 460px; }
  .doing { grid-template-columns: 1fr; gap: 4px; }
  .doing dd { margin-bottom: 12px; }
  .banner-cta .ip-box { width: 100%; }
}

/* ---------- hero photo: the full-size group render fills the banner ---------- */
.top-banner { height: clamp(380px, 68vh, 760px); background: #1d1f1e; }
.top-banner img { inset: 0; left: 0; width: 100%; height: 100%; max-width: none; transform: none; object-fit: cover; object-position: center 58%; image-rendering: auto; box-shadow: none; }

/* wide screens: the photo takes the right side, fading into the banner, so the heading never covers the group */
@media (min-width: 901px) {
  .top-banner { background: radial-gradient(ellipse at 18% 55%, #323635 0%, #1d1f1e 72%); }
  .top-banner img { left: auto; right: 0; width: 64%; object-position: center 56%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20%); mask-image: linear-gradient(90deg, transparent 0, #000 20%); }
  .banner-shade { display: none; }
  .banner-copy { top: 50%; bottom: auto; transform: translateY(-50%); }
  .banner-copy h1 { font-size: clamp(34px, 3.9vw, 62px); max-width: 11ch; }
  .banner-sub { max-width: 32ch; }
  .banner-cta { max-width: 36vw; }
}
/* narrow screens: the photo on top, the text under it */
@media (max-width: 900px) {
  .top-banner { height: auto; }
  .top-banner img { position: relative; inset: auto; display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-position: center 62%; }
  .banner-shade { display: none; }
  .banner-copy { position: relative; bottom: auto; padding-top: 18px; padding-bottom: 22px; }
}
