/* Hunger Games — mc-hg.org */

:root {
  --bg: #120a08;
  --bg-2: #1b100c;
  --panel: #231512;
  --panel-2: #2d1c17;
  --line: #4a2e24;
  --line-soft: rgba(255, 178, 26, 0.12);
  --text: #f6ebe1;
  --muted: #c4ab99;
  --dim: #8f7565;
  --gold: #ffb21a;
  --gold-2: #ff8a00;
  --gold-hi: #ffd76a;
  --red: #d1201b;
  --red-2: #9e1512;
  --green: #4ade80;
  --stone: #5b5552;
  --radius: 6px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --font-display: "Pixelify Sans", "Silkscreen", system-ui, sans-serif;
  --font-ui: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1180px;
  --header-h: 68px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
/* No ghost image when you click-drag a picture or icon */
img, svg, canvas { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-ui); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: 0.01em; }
h1, h2 { font-family: var(--font-display); }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: #1a0d00; padding: 8px 14px; border-radius: 4px; font-weight: 700; }
.skip:focus { left: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */

.btn {
  --b: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  font-family: var(--font-ui); font-size: 1.05rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: #2a1200; background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 45%, var(--gold-2) 100%);
  border: 0; border-radius: var(--radius); cursor: pointer;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.28), inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 6px 18px rgba(255, 138, 0, 0.25);
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
  white-space: nowrap;
}
.btn:hover { color: #2a1200; filter: brightness(1.08); transform: translateY(-2px); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.28), inset 0 2px 0 rgba(255, 255, 255, 0.35); }
.btn svg { width: 20px; height: 20px; flex: none; }

.btn--red { color: #fff; background: linear-gradient(180deg, #ef3b33 0%, var(--red) 50%, var(--red-2) 100%); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.25), 0 6px 18px rgba(209, 32, 27, 0.3); }
.btn--red:hover { color: #fff; }
.btn--ghost { color: var(--text); background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 2px var(--line); }
.btn--ghost:hover { color: var(--gold-hi); box-shadow: inset 0 0 0 2px var(--gold); }
.btn--discord { color: #fff; background: linear-gradient(180deg, #7983f5 0%, #5865f2 55%, #4450d6 100%); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25), inset 0 2px 0 rgba(255, 255, 255, 0.25); }
.btn--discord:hover { color: #fff; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(18, 10, 8, 0.72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.site-header.is-scrolled { background: rgba(18, 10, 8, 0.94); border-bottom-color: var(--line); }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.03em; }
.brand:hover { color: var(--gold-hi); }
.brand img { width: 44px; height: 44px; filter: drop-shadow(0 2px 6px rgba(255, 120, 0, 0.35)); }
.brand span b { color: var(--gold); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  color: var(--muted); font-family: var(--font-ui); font-weight: 600; font-size: 1.02rem; letter-spacing: 0.03em; text-transform: uppercase;
  border-radius: 4px;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav a[aria-current="page"] { color: var(--gold); }
.nav .btn { margin-left: 8px; color: #2a1200; }
.nav .btn:hover { color: #2a1200; background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 45%, var(--gold-2) 100%); }

.nav-toggle { display: none; margin-left: auto; width: 48px; height: 48px; border: 0; background: transparent; color: var(--text); cursor: pointer; border-radius: 6px; }
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 20px;
    background: rgba(18, 10, 8, 0.98); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { min-height: 52px; font-size: 1.15rem; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .nav .btn { margin: 14px 0 0; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: calc(var(--header-h) * -1);
  padding: calc(var(--header-h) + 40px) 0 72px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 42%, rgba(255, 120, 0, 0.22), transparent 70%),
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(209, 32, 27, 0.35), transparent 70%),
    linear-gradient(180deg, #1a0d09 0%, var(--bg) 100%);
}
.hero__bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; opacity: 0.55; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 10, 8, 0.55) 0%, rgba(18, 10, 8, 0.35) 45%, var(--bg) 100%); }
.hero__blocks {
  position: absolute; inset: 0; z-index: -2; opacity: 0.5;
  background-image:
    linear-gradient(rgba(255, 178, 26, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 178, 26, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
}
.hero__embers { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

.hero__logo { width: min(640px, 100%); width: min(640px, 100%, 78svh); margin: 0 auto 4px; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.6)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .hero__logo { animation: none; } }

.hero__tag { max-width: 620px; margin: 0 auto 28px; color: var(--muted); font-size: clamp(1.02rem, 2.6vw, 1.2rem); }
.hero__tag strong { color: var(--text); }

.ip-card {
  display: inline-flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 18px 18px 16px; max-width: 100%;
  background: rgba(35, 21, 18, 0.75); border: 2px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ip-card__label { font-family: var(--font-ui); font-size: 0.9rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }
.ip-btn {
  display: inline-flex; align-items: center; gap: 14px; max-width: 100%;
  min-height: 64px; padding: 0 22px;
  font-family: var(--font-ui); font-weight: 800; font-size: clamp(1.35rem, 5.5vw, 2rem); letter-spacing: 0.04em; text-transform: uppercase;
  color: #2a1200; background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 45%, var(--gold-2) 100%);
  border: 0; border-radius: 8px; cursor: pointer;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.28), inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 10px 30px rgba(255, 138, 0, 0.35);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.ip-btn:hover { filter: brightness(1.07); transform: translateY(-2px); }
.ip-btn:active { transform: translateY(1px); }
.ip-btn svg { width: 26px; height: 26px; flex: none; opacity: 0.85; }
.ip-btn span { overflow: hidden; text-overflow: ellipsis; }

.status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.95rem; color: var(--muted); }
.status__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); flex: none; }
.status[data-state="online"] .status__dot { background: var(--green); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); animation: pulse 2s infinite; }
.status[data-state="offline"] .status__dot { background: var(--red); }
.status strong { color: var(--text); font-variant-numeric: tabular-nums; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

.ip-card__bedrock { font-size: 0.92rem; color: var(--muted); }
.ip-card__bedrock b { color: var(--text); font-weight: 600; }
.ip-card__bedrock-ip { font: inherit; font-weight: 700; color: var(--gold); background: none; border: 0; padding: 4px 2px; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.ip-card__bedrock-ip:hover { color: var(--gold-hi); }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }

/* ---------- Sections ---------- */

.section { padding: 72px 0; position: relative; }
.section--alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
@media (max-width: 600px) { .section { padding: 56px 0; } }

.eyebrow { display: inline-block; margin-bottom: 10px; font-family: var(--font-ui); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.section-head h2 span, h1 span.gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Pixel-cornered panel */
.panel {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ---------- Stats strip ---------- */

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: -36px; position: relative; z-index: 2; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.stat { padding: 18px 14px; text-align: center; }
.stat b { display: block; font-family: var(--font-ui); font-size: clamp(1.6rem, 5vw, 2.2rem); line-height: 1.1; color: var(--gold); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4); }
.stat span { color: var(--muted); font-size: 0.92rem; }

/* ---------- Steps (how a game works) ---------- */

.steps { display: grid; gap: 16px; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s ease, border-color 0.2s ease; }
.step:hover { transform: translateY(-4px); border-color: rgba(255, 178, 26, 0.5); }
.step__art { position: relative; aspect-ratio: 16 / 9; background: var(--bg-2); overflow: hidden; display: grid; place-items: center; }
.step__art img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.step__art .placeholder { width: 64px; height: 64px; image-rendering: pixelated; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6)); }
.step__art[data-tone="lobby"] { background: radial-gradient(circle at 50% 60%, rgba(74, 222, 128, 0.25), transparent 60%), linear-gradient(160deg, #1f2a17, #120a08); }
.step__art[data-tone="shield"] { background: radial-gradient(circle at 50% 60%, rgba(96, 165, 250, 0.28), transparent 60%), linear-gradient(160deg, #15203a, #120a08); }
.step__art[data-tone="feast"] { background: radial-gradient(circle at 50% 60%, rgba(255, 178, 26, 0.32), transparent 60%), linear-gradient(160deg, #3a2410, #120a08); }
.step__art[data-tone="pit"] { background: radial-gradient(circle at 50% 60%, rgba(209, 32, 27, 0.4), transparent 60%), linear-gradient(160deg, #3a1110, #120a08); }
.step__num {
  position: absolute; left: 12px; top: 12px;
  font-family: var(--font-ui); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em;
  padding: 3px 9px; border-radius: 4px; color: #2a1200; background: var(--gold);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}
.step__body { padding: 18px 18px 20px; }
.step__body h3 { margin-bottom: 6px; }
.step__body p { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* ---------- Kit cards ---------- */

.kit-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (min-width: 640px) { .kit-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; } }

.kit {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left;
  padding: 14px; width: 100%;
  color: var(--text); font: inherit; cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.kit:hover { transform: translateY(-3px); border-color: rgba(255, 178, 26, 0.55); color: var(--text); }
.kit__top { display: flex; align-items: center; gap: 12px; width: 100%; }
.kit__icon {
  width: 48px; height: 48px; flex: none; padding: 6px;
  image-rendering: pixelated;
  background: #8b8b8b; border-radius: 2px;
  box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff;
}
.kit__name { font-family: var(--font-ui); font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.kit__desc { color: var(--muted); font-size: 0.9rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.badge {
  display: inline-block; padding: 2px 7px; margin-top: 3px;
  font-family: var(--font-ui); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: 3px; background: rgba(255, 255, 255, 0.06); color: var(--muted);
}
.badge--live { background: rgba(74, 222, 128, 0.14); color: var(--green); }
.badge--challenge { background: rgba(209, 32, 27, 0.18); color: #ff8a80; }

.center-cta { display: flex; justify-content: center; margin-top: 32px; }

/* Kits page toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 22px; }
.search { position: relative; flex: 1 1 260px; }
.search svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.search input {
  width: 100%; min-height: 50px; padding: 0 16px 0 44px;
  font: inherit; font-size: 16px; color: var(--text);
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius);
}
.search input::placeholder { color: var(--dim); }
.search input:focus { outline: none; border-color: var(--gold); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; max-width: 100%; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 44px; padding: 0 16px;
  font-family: var(--font-ui); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.04em;
  color: var(--muted); background: var(--panel); border: 2px solid var(--line); border-radius: 999px; cursor: pointer;
}
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { color: #2a1200; background: var(--gold); border-color: var(--gold); }
.chip small { opacity: 0.75; font-size: 0.82em; margin-left: 4px; }
.result-count { color: var(--dim); font-size: 0.92rem; margin: -8px 0 16px; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }

/* Kit dialog */
.kit-dialog {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
  padding: 0; color: var(--text);
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 2px solid var(--gold); border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}
.kit-dialog::backdrop { background: rgba(8, 4, 3, 0.75); backdrop-filter: blur(3px); }
.kit-dialog__inner { padding: 24px; }
.kit-dialog__head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; padding-right: 36px; }
.kit-dialog__head .kit__icon { width: 72px; height: 72px; padding: 8px; }
.kit-dialog__head h2 { font-size: 1.9rem; margin: 0; }
.kit-dialog p { color: var(--muted); }
.kit-dialog code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(0, 0, 0, 0.35); padding: 2px 8px; border-radius: 4px; color: var(--gold-hi); }
.kit-dialog ol { padding-left: 1.2em; color: var(--muted); }
.kit-dialog__close { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 28px; line-height: 1; }
.kit-dialog__close:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

/* ---------- Features ---------- */

.features { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { padding: 22px; display: flex; gap: 16px; align-items: flex-start; }
.feature img { width: 48px; height: 48px; flex: none; image-rendering: pixelated; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)); }
.feature h3 { font-size: 1.2rem; margin-bottom: 4px; }
.feature p { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* ---------- Community CTA ---------- */

.cta-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .cta-grid { grid-template-columns: repeat(3, 1fr); } }
.cta { padding: 26px 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent, var(--gold)); }
.cta h3 { font-size: 1.5rem; margin: 6px 0 2px; }
.cta p { color: var(--muted); margin: 0 0 14px; flex: 1; }
.cta--discord { --accent: #5865f2; }
.cta--store { --accent: var(--gold); }
.cta--vote { --accent: var(--red); }
.cta__icon { width: 44px; height: 44px; image-rendering: pixelated; }
.vote-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.vote-list a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 4px; background: rgba(0, 0, 0, 0.25); color: var(--text); font-weight: 600; }
.vote-list a:hover { background: rgba(209, 32, 27, 0.25); color: #fff; }

/* ---------- FAQ ---------- */

.faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details { padding: 0; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 60px; padding: 14px 20px;
  font-family: var(--font-ui); font-weight: 600; font-size: 1.12rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.6rem; color: var(--gold); transition: transform 0.2s ease; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 20px 18px; color: var(--muted); }
.faq details > div p:last-child { margin: 0; }

/* ---------- Page header (inner pages) ---------- */

.page-hero {
  margin-top: calc(var(--header-h) * -1);
  padding: calc(var(--header-h) + 48px) 0 40px;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(255, 120, 0, 0.18), transparent 70%),
    linear-gradient(180deg, #1a0d09, var(--bg));
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
}
.page-hero p { color: var(--muted); max-width: 640px; margin: 0 auto; font-size: 1.08rem; }

/* ---------- How to play ---------- */


.prose { max-width: 820px; margin: 0 auto; }
.prose h2 { margin-top: 0; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; background: rgba(0, 0, 0, 0.35); padding: 2px 7px; border-radius: 4px; color: var(--gold-hi); }

.join-steps { display: grid; gap: 12px; grid-template-columns: 1fr; counter-reset: j; margin: 24px 0 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .join-steps { grid-template-columns: repeat(4, 1fr); } }
.platform { max-width: 1100px; margin: 0 auto 48px; }
.platform:last-child { margin-bottom: 0; }
.platform__title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 1.4rem; margin: 0 0 4px; }
.platform__title img { width: 32px; height: 32px; image-rendering: pixelated; }
.platform__title small { font-family: var(--font-body); font-weight: 500; font-size: 0.9rem; color: var(--dim); }
.platform__intro { color: var(--muted); margin: 6px 0 0; }
.platform .join-steps { margin-top: 16px; }
.platform__copy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 16px; }
.platform__copy .btn { white-space: normal; text-align: center; }
.platform__port { color: var(--muted); }
.platform__note { color: var(--dim); font-size: 0.92rem; margin: 14px 0 0; }
.join-steps li { counter-increment: j; padding: 18px; margin: 0; }
.join-steps li::before { content: counter(j); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 10px; border-radius: 4px; background: var(--gold); color: #2a1200; font-family: var(--font-ui); font-weight: 700; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25); }
.join-steps li > b { display: block; color: var(--text); font-family: var(--font-ui); font-size: 1.1rem; margin-bottom: 2px; }
.join-steps span { color: var(--muted); font-size: 0.95rem; }

.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 820px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 39px; top: 8px; bottom: 8px; width: 3px; background: linear-gradient(180deg, var(--green), var(--gold) 40%, var(--red)); border-radius: 2px; opacity: 0.6; }
.timeline li { position: relative; display: grid; grid-template-columns: 80px 1fr; gap: 16px; padding: 0 0 22px; }
.timeline time { position: relative; z-index: 1; align-self: start; display: grid; place-items: center; height: 34px; margin-top: 4px; border-radius: 4px; background: var(--panel-2); border: 2px solid var(--line); font-family: var(--font-ui); font-weight: 700; color: var(--gold); font-size: 0.95rem; }
.timeline .panel { padding: 14px 18px; }
.timeline h3 { font-size: 1.15rem; margin-bottom: 2px; }
.timeline p { margin: 0; color: var(--muted); font-size: 0.97rem; }
@media (max-width: 480px) {
  .timeline::before { left: 31px; }
  .timeline li { grid-template-columns: 64px 1fr; gap: 12px; }
  .timeline time { font-size: 0.85rem; }
}

.card-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.recipe { padding: 18px; text-align: center; }
.recipe__items { display: flex; justify-content: center; align-items: center; gap: 6px; margin-bottom: 12px; color: var(--dim); font-family: var(--font-ui); font-size: 1.3rem; }
.recipe__items img { width: 56px; height: 56px; image-rendering: pixelated; }
.recipe h3 { font-size: 1.1rem; margin-bottom: 2px; }
.recipe p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 2px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 300px; background: var(--panel); }
th, td { padding: 12px clamp(10px, 3vw, 16px); text-align: left; border-bottom: 1px solid var(--line); }
th { font-family: var(--font-ui); font-weight: 600; letter-spacing: 0.04em; color: var(--gold); background: var(--panel-2); }
td { color: var(--muted); font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--text); font-weight: 600; }
td img { display: inline-block; width: 24px; height: 24px; image-rendering: pixelated; vertical-align: middle; margin-right: 8px; }

.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.rules li { display: flex; gap: 14px; padding: 16px 18px; align-items: flex-start; }
.rules li > b { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 4px; background: rgba(209, 32, 27, 0.2); color: #ff8a80; font-family: var(--font-ui); }
.rules li div { color: var(--muted); }
.rules li strong { display: block; color: var(--text); font-family: var(--font-ui); font-size: 1.1rem; font-weight: 600; }

.callout { padding: 18px 20px; border-left: 4px solid var(--gold); margin: 20px 0; }
.callout p { margin: 0; color: var(--muted); }

/* ---------- Legal pages ---------- */

.legal h2 { font-family: var(--font-ui); font-size: 1.35rem; margin: 2em 0 0.5em; }
.legal h3 { font-size: 1.05rem; margin: 1.2em 0 0.3em; color: var(--text); }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal__also { margin-top: 2.5em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--gold-hi); }

/* ---------- Ban appeal form ---------- */

.appeal { max-width: 820px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 600px) { .appeal { padding: 18px 16px; } }
.field-row { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-family: var(--font-ui); font-weight: 600; color: var(--text); }
.field > span em { font-style: normal; font-weight: 400; color: var(--dim); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 16px; color: var(--text);
  background: var(--bg-2); border: 2px solid var(--line); border-radius: var(--radius);
  color-scheme: dark;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field__hint { color: var(--dim); font-size: 0.85rem; }
.field__error { display: none; color: #ff8a80; font-size: 0.88rem; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--red); }
.field.is-invalid .field__error { display: block; }
.appeal__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.appeal__done { padding: 16px; border-radius: var(--radius); background: rgba(74, 222, 128, 0.08); border: 1px solid rgba(74, 222, 128, 0.3); }
.appeal__done p { margin: 0 0 10px; color: var(--muted); }
.appeal__done b { color: var(--green); }
.appeal__done textarea { width: 100%; padding: 12px; font: 0.9rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; resize: vertical; }
.appeal__note { max-width: 820px; margin: 14px auto 0; text-align: center; color: var(--dim); font-size: 0.88rem; }

/* ---------- Footer ---------- */

.site-footer { margin-top: 0; padding: 48px 0 32px; background: #0c0605; border-top: 1px solid var(--line); color: var(--dim); font-size: 0.92rem; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-brand img { width: 72px; height: 72px; margin-bottom: 10px; }
.footer-brand p { max-width: 360px; }
.site-footer h4 { font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.site-footer ul a { display: inline-flex; min-height: 32px; align-items: center; color: var(--muted); }
.site-footer ul a:hover { color: var(--gold-hi); }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: 0.85rem; }

/* Support dropdown */
.nav-drop { position: relative; }
.nav-drop__btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  font-family: var(--font-ui); font-weight: 600; font-size: 1.02rem; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--muted); background: transparent; border: 0; border-radius: 4px; cursor: pointer;
}
.nav-drop__btn svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.nav-drop__btn:hover, .nav-drop.is-open .nav-drop__btn { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-drop.is-current .nav-drop__btn { color: var(--gold); }
.nav-drop.is-open .nav-drop__btn svg { transform: rotate(180deg); }
.nav-drop__menu a[aria-current="page"] { color: var(--gold); }
@media (min-width: 861px) {
  .nav-drop__menu {
    position: absolute; top: calc(100% + 6px); left: 50%; min-width: 210px; padding: 8px;
    display: flex; flex-direction: column;
    background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translate(-50%, -6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  }
  /* invisible bridge so the menu doesn't close while the mouse moves down to it */
  .nav-drop__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
  .nav-drop:hover .nav-drop__menu, .nav-drop.is-open .nav-drop__menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
  .nav-drop:hover .nav-drop__btn svg { transform: rotate(180deg); }
  .nav .nav-drop__menu a { min-height: 40px; padding: 0 12px; font-size: 0.95rem; text-transform: none; letter-spacing: 0; color: var(--muted); }
  .nav .nav-drop__menu a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
  .nav .nav-drop__menu a::after { display: none; }
}
@media (max-width: 860px) {
  .nav-drop__btn { width: 100%; justify-content: space-between; min-height: 52px; padding: 0 14px; font-size: 1.15rem; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .nav-drop__menu { display: none; padding: 4px 0 8px 14px; border-bottom: 1px solid var(--line-soft); }
  .nav-drop.is-open .nav-drop__menu { display: flex; flex-direction: column; }
  .nav .nav-drop__menu a { min-height: 46px; font-size: 1rem; text-transform: none; letter-spacing: 0; border-bottom: 0; }
  /* the phone menu can now be taller than the screen */
  .nav { max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
}

/* ---------- Mobile play bar + toast ---------- */

.playbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: none; align-items: center; gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(18, 10, 8, 0.96); border-top: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transform: translateY(110%); transition: transform 0.25s ease;
}
.playbar.is-visible { transform: none; }
.playbar__ip { flex: 1; min-width: 0; }
.playbar__ip small { display: block; color: var(--dim); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; font-family: var(--font-ui); }
.playbar__ip b { display: block; font-family: var(--font-ui); font-size: 1.1rem; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .playbar { display: flex; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

.toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 20px; border-radius: 8px;
  background: var(--green); color: #052e12; font-family: var(--font-ui); font-weight: 700; letter-spacing: 0.03em;
  box-shadow: var(--shadow);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 761px) { .toast { bottom: 32px; } }

/* ---------- Reveal on scroll ---------- */

/* Phones: short, gentle fade + small rise. Only opacity/transform, so it stays on the GPU. */
.js .reveal { opacity: 0; transform: translate3d(0, 10px, 0); transition: opacity 0.35s ease-out, transform 0.35s ease-out; transition-delay: calc(min(var(--i, 0), 3) * 40ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

[hidden] { display: none !important; }

/* Home page kit preview: 12 cards in even rows */
@media (min-width: 1020px) { .kit-grid--preview { grid-template-columns: repeat(4, 1fr); } }
.heart { display: inline-block; width: 0.8em; height: 0.8em; margin: 0 0 0 0.12em; vertical-align: -0.02em; image-rendering: pixelated; }
@media (max-width: 639px) { .step__art { aspect-ratio: 21 / 9; } }

/* Keep kit cards and the filter row inside narrow screens */
.kit, .kit__top > div, .chips { min-width: 0; }
.kit__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 639px) {
  .chips { flex: 1 1 100%; }
  .kit { padding: 12px; }
  /* icon + badge on one row, the name underneath at full width */
  .kit__top { display: grid; grid-template-columns: 40px 1fr; gap: 8px 10px; align-items: center; }
  .kit__top > div { display: contents; }
  .kit__top .kit__icon { grid-row: 1; grid-column: 1; width: 40px; height: 40px; padding: 4px; }
  .kit__top .badge { grid-row: 1; grid-column: 2; justify-self: start; margin: 0; }
  .kit__top .kit__name { grid-row: 2; grid-column: 1 / -1; font-size: 1.05rem; white-space: normal; overflow-wrap: anywhere; }
}


/* =====================================================================
   Phones and touch screens: subtle and cheap
   ===================================================================== */
@media (max-width: 860px), (hover: none) {
  /* Blur behind fixed bars is expensive while scrolling: use solid colours instead. */
  .site-header, .site-header.is-scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(18, 10, 8, 0.97); }
  .playbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: #160c09; }
  .ip-card { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(35, 21, 18, 0.92); }
  .hero__logo { animation-duration: 8s; }
  @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
  /* Tap feedback instead of hover lifts */
  .kit:hover, .step:hover { transform: none; }
  .kit:active, .step:active, .feature:active, .btn:active, .ip-btn:active, .chip:active { transform: scale(0.97); transition-duration: 0.08s; }
}

/* =====================================================================
   Desktop: the fun stuff (mouse + wide screen only)
   ===================================================================== */
@media (min-width: 861px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  /* Bigger, springier reveals with a stagger across each grid */
  .js .reveal { transform: translate3d(0, 20px, 0); transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 80ms); }
  .js .reveal.is-in { transform: none; }
  .section-head.reveal { transform: translate3d(0, 16px, 0); }

  /* Hero intro: logo drops in, then text, IP card and buttons follow */
  .hero__logo { animation: logo-in 1s cubic-bezier(.2,.9,.25,1.2) both, float 6s ease-in-out 1s infinite; }
  .hero__tag, .ip-card, .hero__actions { animation: rise-in 0.7s cubic-bezier(.2,.8,.2,1) both; }
  .hero__tag { animation-delay: 0.35s; }
  .ip-card { animation-delay: 0.5s; }
  .hero__actions { animation-delay: 0.65s; }
  .page-hero .eyebrow, .page-hero h1, .page-hero p { animation: rise-in 0.6s cubic-bezier(.2,.8,.2,1) both; }
  .page-hero h1 { animation-delay: 0.08s; }
  .page-hero p { animation-delay: 0.16s; }
  @keyframes logo-in { from { opacity: 0; transform: translateY(-40px) scale(0.85); filter: brightness(2) drop-shadow(0 0 60px rgba(255, 140, 0, 0.9)); } to { opacity: 1; transform: none; } }
  @keyframes rise-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

  /* Mouse parallax on the hero (set by js/fx.js); "translate" stacks with the float animation */
  .hero__logo { translate: var(--px, 0) var(--py, 0); transition: translate 0.25s ease-out; }
  .hero__blocks { translate: calc(var(--px, 0px) * -1.5) calc(var(--py, 0px) * -1.5); transition: translate 0.3s ease-out; }

  /* Light sweeping across the IP button */
  .ip-btn { position: relative; overflow: hidden; }
  .ip-btn::after { content: ""; position: absolute; inset: -20% auto -20% -40%; width: 30%; transform: skewX(-20deg) translateX(-200%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent); animation: shine 4.5s ease-in-out 1.5s infinite; pointer-events: none; }
  @keyframes shine { 0%, 70% { transform: skewX(-20deg) translateX(-200%); } 100% { transform: skewX(-20deg) translateX(650%); } }
  .ip-btn:hover svg { animation: wiggle 0.5s ease; }
  @keyframes wiggle { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }

  /* Buttons: glow on hover */
  .btn:hover { box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.28), inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 10px 30px rgba(255, 138, 0, 0.45); }

  /* Nav: gold underline grows on hover */
  .nav a:not(.btn) { position: relative; }
  .nav a:not(.btn)::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 8px; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease; }
  .nav a:not(.btn):hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

  /* Gold heading words shimmer */
  .section-head h2 span, h1 span.gold { background: linear-gradient(100deg, var(--gold-2) 0%, var(--gold-hi) 30%, #fff3c4 45%, var(--gold-hi) 60%, var(--gold-2) 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; animation: shimmer 5s linear infinite; }
  @keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }

  /* 3D tilt + glare on cards (angles and glare position set by js/fx.js) */
  .tilt { transition: transform 0.2s ease-out, border-color 0.2s ease, box-shadow 0.2s ease; }
  .tilt.is-tilting { will-change: transform; }
  .tilt.is-tilting { transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px) scale(1.02); transition: transform 0.08s linear, border-color 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 22px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 178, 26, 0.25); border-color: rgba(255, 178, 26, 0.6); z-index: 1; }
  .tilt::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.2s ease; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 200, 90, 0.18), transparent 55%); }
  .tilt.is-tilting::after { opacity: 1; }

  /* Kit and feature icons bounce on hover */
  .kit:hover .kit__icon, .feature:hover img, .step:hover .placeholder, .cta:hover .cta__icon { animation: bob 0.6s cubic-bezier(.3,1.6,.5,1); }
  @keyframes bob { 0% { transform: none; } 40% { transform: translateY(-6px) rotate(-6deg) scale(1.1); } 100% { transform: none; } }
  .step:hover .step__art .placeholder { transform: scale(1.15); }
  .step__art .placeholder { transition: transform 0.3s ease; }

  /* Kits page: cards cascade in when the list renders or a filter changes */
  [data-kit-browser] .kit.kit-in { animation: kit-in 0.45s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(min(var(--k, 0), 24) * 22ms); }
  @keyframes kit-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }

  /* Timeline badges pop as they arrive */
  .timeline li.is-in time { animation: pop 0.5s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(var(--i, 0) * 90ms + 0.15s); }
  @keyframes pop { from { transform: scale(0.6); } to { transform: none; } }

  /* Scroll progress bar under the header */
  .scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: linear-gradient(90deg, var(--red), var(--gold), var(--gold-hi)); transform-origin: left; transform: scaleX(var(--p, 0)); pointer-events: none; }

  /* FAQ answers slide open */
  .faq details[open] > div { animation: rise-in 0.3s ease both; }
}
