/* _mg.css */
@font-face { font-family: 'Rajdhani'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/rajdhani-400.woff2') format('woff2'); }
@font-face { font-family: 'Rajdhani'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/rajdhani-500.woff2') format('woff2'); }
@font-face { font-family: 'Rajdhani'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/rajdhani-600.woff2') format('woff2'); }
@font-face { font-family: 'Rajdhani'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/rajdhani-700.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/barlow-400.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/barlow-500.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/barlow-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/barlow-700.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/jetbrains-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/jetbrains-mono-500.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/jetbrains-mono-600.woff2') format('woff2'); }
@font-face { font-family: 'Press Start 2P'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/press-start-2p.woff2') format('woff2'); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; scroll-padding-top: 80px; }
body { font-family: "Barlow", system-ui, sans-serif; -webkit-font-smoothing: antialiased; padding-top: 64px; overflow-x: hidden; overflow-x: clip; }
em { font-style: italic; }
h1, h2, h3, h4, h5, h6, p, li { text-wrap: pretty; }
.mg-skip-link { position: absolute; top: -100%; left: 16px; z-index: 100; padding: 8px 16px; background: #fff; color: #14161c; font-family: var(--mg-font-body); font-size: 14px; font-weight: 600; border-radius: 9999px; text-decoration: none; opacity: 0; transition: opacity 150ms; }
.mg-skip-link:focus { top: 12px; opacity: 1; outline: 2px solid var(--mg-cosmic-glow); outline-offset: 2px; }
img { display: block; max-width: 100%; }

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #6fb5ff;
  outline-offset: 3px;
  border-radius: 4px;
}

:root {
  --mg-red: #d11a1a;
  --mg-red-bright: #e63232;
  --mg-green: #3a9928;
  --mg-blue: #0c4f8d;
  --mg-blue-bright: #1a6dc4;
  --mg-cosmic-deep: #0a0d2a;
  --mg-cosmic-mid: #1a3680;
  --mg-cosmic-bright: #3a7be8;
  --mg-cosmic-glow: #6fb5ff;
  --mg-canvas-light: #f5f4ef;
  --mg-surface-elevated: #161721;
  --mg-hairline-light: #e6e3d8;
  --mg-ink: #14161c;
  --mg-body-color: #1f2228;
  --mg-mute: #4f5764;
  --mg-stone: #636b78;
  --mg-faint: #c3c5cc;
  --mg-font-display: "Rajdhani", system-ui, sans-serif;
  --mg-font-body: "Barlow", system-ui, sans-serif;
  --mg-font-mono: "JetBrains Mono", monospace;
  --mg-font-pixel: "Press Start 2P", monospace;
}

@keyframes hexFloat {
  from { background-position: 0 0; }
  to   { background-position: 56px 64px; }
}
@keyframes fadeRise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Scroll-reveal animation system ──────────────────────────────────── */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(32px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes revealFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes revealScale {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes revealLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes revealRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

[data-reveal] {
  opacity: 0;
}
[data-reveal].revealed {
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}
[data-reveal="up"].revealed { animation-name: revealUp; }
[data-reveal="fade"].revealed { animation-name: revealFade; }
[data-reveal="scale"].revealed { animation-name: revealScale; }
[data-reveal="left"].revealed { animation-name: revealLeft; }
[data-reveal="right"].revealed { animation-name: revealRight; }

/* Stagger children: parent gets data-stagger, children get data-reveal */
[data-stagger] > [data-reveal] { --stagger-index: 0; }
[data-stagger] > [data-reveal].revealed {
  animation-delay: calc(var(--stagger-index) * 80ms);
}

/* Duration variants */
[data-reveal].revealed { animation-duration: 0.7s; }
[data-reveal-duration="fast"].revealed { animation-duration: 0.4s; }
[data-reveal-duration="slow"].revealed { animation-duration: 1s; }

/* ── Hero entrance choreography ──────────────────────────────────────── */
@keyframes heroEnter {
  from { opacity: 0; transform: translateY(28px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.hero-anim > * {
  opacity: 0;
  animation: heroEnter 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-anim > *:nth-child(1) { animation-delay: 0.1s; }
.hero-anim > *:nth-child(2) { animation-delay: 0.25s; }
.hero-anim > *:nth-child(3) { animation-delay: 0.4s; }
.hero-anim > *:nth-child(4) { animation-delay: 0.55s; }
.hero-anim > *:nth-child(5) { animation-delay: 0.7s; }
.hero-anim > *:nth-child(6) { animation-delay: 0.85s; }

/* ── Hover micro-interactions ────────────────────────────────────────── */
.mg-lift {
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
}
.mg-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
}
.mg-lift:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.mg-glow {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.mg-glow:hover {
  box-shadow: 0 0 0 3px rgba(111,181,255,0.15), 0 8px 24px rgba(0,0,0,0.06);
  border-color: var(--mg-cosmic-glow);
}

.mg-pulse:hover {
  animation: subtlePulse 1.5s ease infinite;
}
@keyframes subtlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.mg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 22px;
  border-radius: 9999px;
  border: var(--btn-border, none);
  background: var(--btn-bg, #fff);
  color: var(--btn-fg, #000);
  font-family: var(--mg-font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.2px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 200ms cubic-bezier(.2,.8,.2,1), transform 200ms cubic-bezier(.34,1.56,.64,1), box-shadow 200ms ease;
}
.mg-btn--sm {
  height: 38px;
  font-size: 13px;
  padding: 0 16px;
}
.mg-btn:hover {
  background: var(--btn-hover-bg, var(--btn-bg, #fff));
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.mg-btn:active {
  transform: scale(0.96);
}
.mg-btn--primary { --btn-bg: #fff; --btn-fg: #000; --btn-border: none; --btn-hover-bg: #e8e8e8; }
.mg-btn--dark { --btn-bg: #14161c; --btn-fg: #fff; --btn-border: none; --btn-hover-bg: #2a2d36; }
.mg-btn--blue { --btn-bg: #0c4f8d; --btn-fg: #fff; --btn-border: none; --btn-hover-bg: #1a6bb5; }
.mg-btn--green { --btn-bg: #3a9928; --btn-fg: #fff; --btn-border: none; --btn-hover-bg: #4ab835; }
.mg-btn--red { --btn-bg: #d11a1a; --btn-fg: #fff; --btn-border: none; --btn-hover-bg: #e83333; }
.mg-btn--outline-dark { --btn-bg: transparent; --btn-fg: #fff; --btn-border: 1px solid rgba(255,255,255,0.35); --btn-hover-bg: rgba(255,255,255,0.1); }
.mg-btn--outline-light { --btn-bg: transparent; --btn-fg: #14161c; --btn-border: 1px solid #c3c5cc; --btn-hover-bg: rgba(0,0,0,0.04); }

/* Button hover enhancements */
.mg-btn-pop {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.mg-btn-pop:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.mg-btn-pop:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Card accent line animation */
.mg-accent-slide {
  position: relative;
  overflow: hidden;
}
.mg-accent-slide::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--mg-cosmic-glow);
  transform: translateX(-101%);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mg-accent-slide:hover::after {
  transform: translateX(0);
}

/* Link underline reveal */
.mg-link-reveal {
  position: relative;
  text-decoration: none;
}
.mg-link-reveal::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mg-link-reveal:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; animation: none !important; }
  .hero-anim > * { opacity: 1; animation: none !important; }
  .mg-lift:hover { transform: none; }
  .mg-btn:hover { transform: none; }
  .mg-btn-pop:hover { transform: none; }
  .mg-pulse:hover { animation: none; }
}

/* Prose styles for article pages */
.prose { font-family: var(--mg-font-body); font-size: 19px; line-height: 1.65; color: var(--mg-body-color); text-align: justify; }
.prose p { margin: 0 0 24px; }
.prose p.lede { font-size: 19px; line-height: 1.65; color: var(--mg-ink); font-style: italic; position: relative; background: #fff; border: 1px solid var(--mg-hairline-light); border-radius: 16px; padding: 24px 28px; margin-bottom: 32px; }
.prose p.lede::before { content: ''; position: absolute; left: -10px; top: 32px; width: 18px; height: 18px; background: #fff; border-left: 1px solid var(--mg-hairline-light); border-bottom: 1px solid var(--mg-hairline-light); transform: rotate(45deg); }
.prose h2 { font-family: var(--mg-font-display); font-weight: 600; font-size: 32px; line-height: 1.15; letter-spacing: -0.4px; margin: 40px 0 16px; color: var(--mg-ink); }
.prose blockquote { margin: 32px 0; padding: 20px 24px; border-left: 4px solid var(--mg-red); background: #fff; font-style: italic; color: var(--mg-ink); font-size: 20px; line-height: 1.5; }
.prose a { color: var(--mg-blue); text-decoration: underline; text-decoration-color: rgba(12,79,141,0.3); text-underline-offset: 3px; transition: text-decoration-color 150ms; }
.prose a:hover { text-decoration-color: var(--mg-blue); }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 28px; text-align: left; text-wrap: balance; }
.prose ul { list-style: none; }
.prose ul li { position: relative; padding-left: 18px; margin: 0 0 12px; }
.prose ul li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border-radius: 1px; background: var(--mg-red); transform: rotate(45deg); }
.prose ol { list-style: none; counter-reset: prose-ol; }
.prose ol li { position: relative; padding-left: 32px; margin: 0 0 12px; counter-increment: prose-ol; }
.prose ol li::before { content: counter(prose-ol); position: absolute; left: 0; top: 5px; font-family: var(--mg-font-mono); font-size: 13px; font-weight: 600; color: var(--mg-blue); background: rgba(12,79,141,0.08); width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.prose li strong { color: var(--mg-ink); }
.prose-callout { margin: 32px 0; padding: 20px 24px; border-left: 4px solid var(--mg-blue); background: rgba(12,79,141,0.04); border-radius: 0 8px 8px 0; font-size: 17px; line-height: 1.6; color: var(--mg-ink); }
.prose-callout strong { display: block; font-family: var(--mg-font-display); font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--mg-blue); margin-bottom: 6px; }
.prose figure { margin: 36px 0; }
.prose figure img { width: 100%; border-radius: 8px; }
.prose figcaption { font-family: var(--mg-font-mono); font-size: 13px; color: var(--mg-mute); margin-top: 10px; text-align: center; }

/* ── Layout ──────────────────────────────────────────────────────────── */
.mg-container { max-width: 1200px; margin: 0 auto; }
.mg-container--narrow { max-width: 900px; margin: 0 auto; }
.mg-container--text { max-width: 720px; margin: 0 auto; }
.mg-container--mid { max-width: 840px; margin: 0 auto; }
.mg-section { padding: 120px 32px; }
.mg-section--tight { padding: 80px 32px; }
.mg-section--flush-top { padding-top: 0; }
.mg-section--flush-bot { padding-bottom: 0; }
.mg-section--light { background: var(--mg-canvas-light); }
.mg-section--white { background: #fff; }
.mg-section--dark { background: #000; color: #fff; }
.mg-section--border-top { border-top: 1px solid var(--mg-hairline-light); }

/* ── Stats row (dark bg) ─────────────────────────────────────────────── */
.stats-row { display: flex; gap: 0; align-items: center; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.12); }
.stats-row__divider { width: 1px; height: 24px; background: rgba(255,255,255,0.12); margin: 0 20px; }
.stats-row__item { display: flex; flex-direction: column; align-items: center; text-align: center; }
.stats-row__label { font-family: var(--mg-font-body); font-size: 10px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; }
.stats-row__value { font-family: var(--mg-font-mono); font-weight: 600; font-size: 16px; color: #fff; margin-top: 4px; }

/* ── Rules sections ──────────────────────────────────────────────────── */
.rules-section { padding-bottom: 48px; margin-bottom: 48px; border-bottom: 1px solid var(--mg-hairline-light); }
.rules-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.rules-section__num { font-family: var(--mg-font-mono); font-size: 12px; color: var(--mg-stone); letter-spacing: 0.5px; margin-bottom: 10px; }
.rules-section__num--green { color: var(--mg-green); }
.rules-section__num--blue { color: var(--mg-blue); }
.rules-section__num--red { color: var(--mg-red); }
.rules-section__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 40px; line-height: 1.15; letter-spacing: -0.5px; color: var(--mg-ink); margin: 0 0 16px; }
.rules-section__body { font-family: var(--mg-font-body); font-size: 17px; line-height: 1.6; color: #3a3d44; margin: 0; max-width: 640px; }

/* ── Related mods grid ───────────────────────────────────────────────── */
.related-heading { font-family: var(--mg-font-display); font-weight: 600; font-size: 40px; line-height: 1.15; letter-spacing: -0.5px; color: var(--mg-ink); margin: 0 0 32px; }

/* ── Game page hero ──────────────────────────────────────────────────── */
.game-hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; background: #000; min-height: 580px; }
.game-hero__gradient { position: absolute; inset: 0; }
.game-hero__bloom { position: absolute; left: 50%; bottom: -100px; transform: translateX(-50%); width: 1200px; height: 500px; pointer-events: none; filter: blur(30px); }
.game-hero__bloom--green { background: radial-gradient(ellipse, rgba(58,153,40,0.4) 0%, transparent 65%); }
.game-hero__bloom--blue { background: radial-gradient(ellipse, rgba(12,79,141,0.4) 0%, transparent 65%); }
.game-hero__bloom--red { background: radial-gradient(ellipse, rgba(209,26,26,0.4) 0%, transparent 65%); }
.game-hero__hex { position: absolute; inset: 0; background-size: 56px 64px; animation: hexFloat 30s linear infinite; }
.game-hero__fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 50%, rgba(0,0,0,0.5) 100%); pointer-events: none; }
.game-hero__inner { position: relative; padding: 100px 32px 120px; max-width: 1200px; margin: 0 auto; box-sizing: border-box; display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.game-hero__text { display: flex; flex-direction: column; }
@media (max-width: 768px) { .game-hero__inner { grid-template-columns: 1fr; } .game-hero__logo { justify-self: center; order: -1; } }
.game-hero__back { font-family: var(--mg-font-mono); font-size: 12px; color: rgba(255,255,255,0.7); text-decoration: none; }
.game-hero__tags { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; align-items: center; }
.game-hero__tag { font-family: var(--mg-font-body); font-weight: 600; font-size: 11px; color: #fff; padding: 4px 10px; border-radius: 9999px; }
.game-hero__tag--outline { font-family: var(--mg-font-mono); font-size: 11px; color: rgba(255,255,255,0.7); padding: 4px 10px; border: 1px solid rgba(255,255,255,0.2); border-radius: 9999px; background: none; font-weight: 400; }
.game-hero__version { font-family: var(--mg-font-pixel); font-size: 9px; padding: 5px 10px; letter-spacing: 1px; }
.game-hero__logo { width: clamp(180px, 22vw, 300px); height: auto; object-fit: contain; filter: drop-shadow(0 16px 40px rgba(0,0,0,0.6)); animation: floatBadge 5s ease-in-out infinite; display: block; position: relative; z-index: 1; justify-self: end; align-self: center; }
.game-hero__title { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(56px, 8vw, 128px); line-height: 0.92; letter-spacing: -0.03em; margin: 24px 0; text-shadow: 0 4px 30px rgba(0,0,0,0.6); }
.game-hero__lede { font-family: var(--mg-font-body); font-size: 19px; line-height: 1.55; color: rgba(255,255,255,0.86); max-width: 640px; margin: 0 0 36px; text-shadow: 0 2px 16px rgba(0,0,0,0.7); text-wrap: balance; }
.game-hero__btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Stats bar (game pages) ──────────────────────────────────────────── */
.stats-bar { background: #000; color: #fff; padding: 0 32px 56px; }
.stats-bar__inner { max-width: 1200px; margin: 0 auto; display: flex; gap: 0; align-items: center; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.10); }

/* ── Section headings ────────────────────────────────────────────────── */
.mg-eyebrow { font-family: var(--mg-font-pixel); font-size: 11px; letter-spacing: 1.5px; margin-bottom: 22px; line-height: 1; display: inline-flex; align-items: center; gap: 8px; }
.mg-container .mg-eyebrow + .mg-heading-lg { margin-bottom: 32px; }
.mg-container .mg-eyebrow:not(:first-child) { margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--mg-hairline-light); }
.mg-eyebrow::before { content: ''; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 7px solid currentColor; flex-shrink: 0; }
.mg-eyebrow--green { color: var(--mg-green); }
.mg-eyebrow--blue { color: var(--mg-blue); }
.mg-eyebrow--red { color: var(--mg-red); }
.mg-eyebrow--purple { color: #8b5cf6; }
.mg-eyebrow--glow { color: var(--mg-cosmic-glow); text-shadow: 0 0 12px rgba(111,181,255,0.5); }
.mg-heading-xl { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(36px, 4.5vw, 56px); line-height: 1.05; letter-spacing: -0.025em; color: var(--mg-ink); margin: 0 0 48px; text-wrap: balance; }
.mg-heading-xl--light { color: #fff; }
.mg-heading-lg { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(32px, 4vw, 48px); line-height: 1.05; letter-spacing: -0.025em; color: var(--mg-ink); margin: 0 0 12px; text-wrap: balance; }
.mg-heading-md { font-family: var(--mg-font-display); font-weight: 600; font-size: 32px; line-height: 1.15; letter-spacing: -0.4px; color: var(--mg-ink); margin: 0 0 16px; text-wrap: balance; }
.mg-body-sub { font-family: var(--mg-font-body); font-size: 16px; line-height: 1.55; color: var(--mg-mute); margin: 0 0 32px; max-width: 720px; text-wrap: balance; }
.mg-body-sub--light { color: rgba(255,255,255,0.78); }
.mg-text-center { text-align: center; margin-left: auto; margin-right: auto; }
.mg-eyebrow.mg-text-center { display: flex; justify-content: center; }

/* ── Cards (generic) ─────────────────────────────────────────────────── */
.mg-card { background: #fff; border: 1px solid var(--mg-hairline-light); border-radius: 16px; padding: 24px; }
.mg-card--light { background: #fff; }
.mg-section--white .mg-card--light { background: var(--mg-canvas-light); }
.mg-section--white .mg-card { background: var(--mg-canvas-light); }
.mg-card--featured { background: var(--mg-ink); border-color: var(--mg-ink); }
.mg-card--featured .mg-card__title { color: #fff; }
.mg-card--featured .mg-card__body { color: rgba(255,255,255,0.7); }
.mg-card--featured .mg-card__link { color: #6fb5ff; }
.mg-card--row { display: flex; gap: 16px; align-items: flex-start; border-radius: 14px; }
.mg-card__eyebrow { font-family: var(--mg-font-pixel); font-size: 9px; letter-spacing: 1.5px; margin-bottom: 14px; }
.mg-card__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 22px; line-height: 1.2; letter-spacing: -0.25px; color: var(--mg-ink); margin: 0 0 10px; }
.mg-card__body { font-family: var(--mg-font-body); font-size: 14px; line-height: 1.55; color: #3a3d44; margin: 0; text-wrap: balance; }
.mg-card__icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; flex: none; }
.mg-card--note { background: var(--mg-canvas-light); border: none; border-left: 3px solid var(--mg-cosmic-glow); border-radius: 0 12px 12px 0; }
.mg-card--note .mg-card__title { font-size: 18px; margin-bottom: 8px; }
.mg-card--note .mg-card__body { font-size: 15px; line-height: 1.65; text-wrap: pretty; }
.mg-grid-notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.mg-card__mono-title { font-family: var(--mg-font-mono); font-weight: 600; font-size: 14px; }
.mg-card__desc { font-family: var(--mg-font-body); font-size: 13px; color: #3a3d44; line-height: 1.5; margin-top: 6px; }
.mg-card__link { font-family: var(--mg-font-mono); font-size: 12px; color: var(--mg-blue); margin-top: 12px; display: inline-block; text-decoration: none; }

/* Dungeon Chess section */
.dc-header { display: flex; gap: 48px; align-items: center; margin-bottom: 48px; }
.dc-logo-img { width: clamp(160px, 20vw, 260px); height: auto; flex: none; filter: drop-shadow(0 8px 24px rgba(58,153,40,0.3)); animation: floatBadge 5s ease-in-out infinite; }
@media (max-width: 768px) { .dc-header { flex-direction: column; align-items: center; text-align: center; } }

/* ── Game index cards ────────────────────────────────────────────────── */
.game-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--mg-hairline-light); border-radius: 20px; overflow: hidden; text-decoration: none; color: inherit; transition: border-color 180ms, transform 180ms; }
.game-card:hover { transform: translateY(-3px); }
.game-card__bar { height: 4px; }
.game-card__thumb { width: 100%; height: 160px; position: relative; overflow: hidden; }
.game-card__thumb-hex { position: absolute; inset: 0; background-size: 28px 32px; }
.game-card__logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 24px; z-index: 1; }
.game-card__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.game-card__status { font-family: var(--mg-font-mono); font-size: 11px; letter-spacing: 0.5px; }
.game-card__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 24px; line-height: 1.2; letter-spacing: -0.3px; color: var(--mg-ink); margin: 0; }
.game-card__desc { font-family: var(--mg-font-body); font-size: 14px; line-height: 1.55; color: var(--mg-mute); margin: 0; flex: 1; text-wrap: balance; }
.game-card__stats { font-family: var(--mg-font-mono); font-size: 12px; color: var(--mg-stone); padding-top: 12px; border-top: 1px solid var(--mg-hairline-light); }

/* ── Submit CTA card (reusable across pages) ──────────── */
.mods-submit-cta { display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--mg-ink); background: var(--mg-canvas-light); border: 2px dashed var(--mg-hairline-light); border-radius: 16px; padding: 40px 32px; text-align: center; transition: border-color 200ms, background 200ms; min-height: 200px; }
.mods-submit-cta:hover { border-color: var(--mg-green); background: rgba(58,153,40,0.04); }
.mods-submit-cta__inner { max-width: 400px; }
.mods-submit-cta__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 22px; margin: 12px 0 8px; color: var(--mg-ink); }
.mods-submit-cta__body { font-family: var(--mg-font-body); font-size: 15px; line-height: 1.5; color: var(--mg-mute); margin: 0 0 20px; text-wrap: balance; }
.mods-submit-cta__btn { display: inline-flex; align-items: center; height: 40px; padding: 0 20px; background: var(--mg-green); color: #fff; border-radius: 9999px; font-family: var(--mg-font-body); font-weight: 600; font-size: 14px; }

/* ── Source / license footer ─────────────────────────────────────────── */
.mod-source { display: flex; gap: 32px; flex-wrap: wrap; }
.mod-source__group { }
.mod-source__label { font-family: var(--mg-font-body); font-size: 11px; color: rgba(20,22,28,0.5); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.mod-source__value { font-family: var(--mg-font-mono); font-size: 14px; color: var(--mg-ink); }

/* ── Simple rules list (community mods) ──────────────────────────────── */
.rules-list { display: flex; flex-direction: column; gap: 40px; }
.rules-list__item { padding-bottom: 32px; border-bottom: 1px solid var(--mg-hairline-light); }
.rules-list__item:last-child { border-bottom: none; padding-bottom: 0; }
.rules-list__num { font-family: var(--mg-font-pixel); font-size: 9px; letter-spacing: 1.5px; margin-bottom: 12px; }
.rules-list__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 24px; line-height: 1.2; letter-spacing: -0.3px; color: var(--mg-ink); margin: 0 0 10px; }
.rules-list__body { font-family: var(--mg-font-body); font-size: 16px; line-height: 1.6; color: #3a3d44; margin: 0; }

/* ── Compact hero (community mods) ───────────────────────────────────── */
.compact-hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; background: #000; min-height: 420px; }
.compact-hero__gradient { position: absolute; inset: 0; background: linear-gradient(180deg, #0a0d2a 0%, #1a3680 45%, #000 100%); }
.compact-hero__hex { position: absolute; inset: 0; background-size: 56px 64px; animation: hexFloat 30s linear infinite; }
.compact-hero__fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 50%, rgba(0,0,0,0.6) 100%); pointer-events: none; }
.compact-hero__inner { position: relative; padding: 64px 32px 80px; max-width: 900px; margin: 0 auto; box-sizing: border-box; }
.compact-hero__title { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(40px, 6vw, 72px); line-height: 0.95; letter-spacing: -0.03em; margin: 20px 0 16px; }
.compact-hero__lede { font-family: var(--mg-font-body); font-size: 18px; line-height: 1.55; color: rgba(255,255,255,0.82); max-width: 600px; margin: 0 0 28px; }
.compact-hero__stats { display: flex; gap: 24px; flex-wrap: wrap; font-family: var(--mg-font-mono); font-size: 13px; color: rgba(255,255,255,0.7); }

/* ── Dark text section (engine, centered) ────────────────────────────── */
.mg-dark-center { background: #000; color: #fff; padding: 120px 32px; position: relative; overflow: hidden; text-align: center; }
.mg-dark-center__bloom { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 800px; height: 400px; pointer-events: none; filter: blur(24px); }
.mg-dark-center__inner { position: relative; }
.mg-dark-center__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(36px, 5vw, 64px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 18px; }
.mg-dark-center__body { font-family: var(--mg-font-body); font-size: 17px; line-height: 1.6; color: rgba(255,255,255,0.78); margin: 0 auto 32px; max-width: 540px; text-wrap: balance; }
.mg-dark-center__pills { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.mg-dark-center__pill { font-family: var(--mg-font-mono); font-size: 12px; color: rgba(255,255,255,0.7); padding: 6px 14px; border: 1px solid rgba(255,255,255,0.2); border-radius: 9999px; }
.mg-dark-center__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Community header (title + submit link) ──────────────────────────── */
.community-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 32px; }
.community-header__link { font-family: var(--mg-font-body); font-weight: 600; font-size: 14px; color: var(--mg-blue); text-decoration: none; }

/* ── TOC list (sticky sidebar) ────────────────────────────────────────── */
.toc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.toc-list__link { display: flex; gap: 10px; align-items: baseline; font-family: var(--mg-font-body); font-size: 14px; color: var(--mg-ink); text-decoration: none; padding: 4px 0; }
.toc-list__num { font-family: var(--mg-font-mono); font-size: 11px; color: var(--mg-stone); min-width: 18px; }

/* ── Component list (Talisman etc.) ──────────────────────────────────── */
.component-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.component-list__item { display: flex; gap: 12px; align-items: flex-start; font-family: var(--mg-font-body); font-size: 14px; color: var(--mg-ink); line-height: 1.5; }
.component-list__bullet { width: 7px; height: 7px; margin-top: 7px; border-radius: 2px; flex: none; border: 2px solid var(--mg-blue); }
.mg-card:has(.mg-eyebrow--red) .component-list__bullet { border-color: #d11a1a; }
.mg-card:has(.mg-eyebrow--green) .component-list__bullet { border-color: #3a9928; }
.mg-card:has(.mg-eyebrow--blue) .component-list__bullet { border-color: #0c4f8d; }

/* ── Utility ─────────────────────────────────────────────────────────── */
.mg-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mg-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mg-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mg-grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }

/* ── Homepage hero content ────────────────────────────────────────────── */
.home-hero__title { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(52px, 8.5vw, 120px); line-height: 1.0; letter-spacing: -0.025em; color: #fff; margin: 0 auto 32px; max-width: 1000px; text-shadow: 0 4px 40px rgba(0,0,0,0.6); text-wrap: balance; overflow-wrap: break-word; }
.home-hero__lede { font-family: var(--mg-font-body); font-size: 18px; line-height: 1.65; color: rgba(255,255,255,0.86); max-width: 560px; margin: 0 auto 40px; text-shadow: 0 2px 16px rgba(0,0,0,0.7); text-wrap: balance; }
.home-hero__btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ── Homepage sections ────────────────────────────────────────────────── */
.home-gallery { background: var(--mg-canvas-light); padding: 140px 24px; }
.home-gallery__header { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 24px; margin-bottom: 40px; }
.home-gallery__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(36px, 5vw, 60px); line-height: 1.05; letter-spacing: -0.025em; color: var(--mg-ink); }
.home-gallery__filters { display: flex; gap: 8px; flex-wrap: wrap; }
.home-gallery__cta { text-align: center; margin-top: 48px; }
.home-gallery__cta a { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; border-radius: 9999px; border: 1px solid #3a3d44; background: transparent; color: var(--mg-ink); font-family: var(--mg-font-body); font-weight: 600; font-size: 15px; text-decoration: none; }

.filter-btn { font-family: var(--mg-font-body); font-weight: 600; font-size: 13px; height: 36px; padding: 0 14px; border-radius: 9999px; border: 1px solid var(--mg-faint); background: transparent; color: var(--mg-ink); cursor: pointer; transition: all 150ms; }
.filter-btn--active { border: none; background: #000; color: #fff; }

.home-nuke { background: #000; color: #fff; padding: 140px 24px 220px; position: relative; overflow: hidden; text-align: center; }
.home-nuke__bloom { position: absolute; left: 50%; top: 55%; transform: translateX(-50%); width: 1100px; height: 420px; background: radial-gradient(ellipse, rgba(209,26,26,0.38) 0%, transparent 65%); pointer-events: none; filter: blur(24px); }
.home-nuke__inner { position: relative; max-width: 1200px; margin: 0 auto; }
.home-nuke__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(44px, 7vw, 96px); line-height: 0.95; letter-spacing: -0.025em; margin: 0 auto 32px; max-width: 900px; text-shadow: 0 4px 30px rgba(0,0,0,0.6); text-wrap: balance; }
.home-nuke__heading em { color: #e63232; }
.home-nuke__body { font-family: var(--mg-font-body); font-size: 18px; line-height: 1.65; color: rgba(255,255,255,0.82); max-width: 540px; margin: 0 auto 40px; }
.home-nuke__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.home-nuke__cube { margin: 0 auto 40px; display: flex; align-items: center; justify-content: center; }
.home-nuke__img { width: clamp(320px, 40vw, 480px); height: auto; margin: 0 auto 56px; border-radius: 20px; filter: drop-shadow(0 24px 48px rgba(209,26,26,0.5)); position: relative; z-index: 1; }
.home-nuke__smoke { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.home-nuke__smoke-wisp { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(220,80,20,0.5) 0%, rgba(160,40,10,0.25) 35%, transparent 70%); filter: blur(14px); animation: smokeRise var(--dur) var(--delay) ease-out infinite; opacity: 0; }
@keyframes smokeRise {
  0% { opacity: 0; transform: translate(var(--x), 0) scale(0.5); }
  10% { opacity: var(--o); }
  60% { opacity: calc(var(--o) * 0.7); }
  100% { opacity: 0; transform: translate(calc(var(--x) + var(--drift)), -150px) scale(1.5); }
}

.home-featured { background: #000; color: #fff; padding: 140px 24px; overflow: hidden; isolation: isolate; position: relative; }
.home-featured__glow { position: absolute; right: -120px; top: 50%; transform: translateY(-50%); width: 600px; height: 600px; background: radial-gradient(circle, rgba(58,123,232,0.22) 0%, transparent 60%); pointer-events: none; }
.home-featured__inner { max-width: 1200px; margin: 0 auto; position: relative; display: grid; grid-template-columns: 1fr auto; gap: 64px; align-items: center; }
.home-featured__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(36px, 5.5vw, 72px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 24px; }
.home-featured__body { font-family: var(--mg-font-body); font-size: 18px; line-height: 1.65; color: rgba(255,255,255,0.78); max-width: 560px; margin: 0 0 32px; }
.home-featured__btns { display: flex; gap: 12px; margin-bottom: 36px; }
.home-featured__cube { filter: drop-shadow(0 8px 50px rgba(58,123,232,0.4)); }
.home-featured__logo { width: clamp(240px, 30vw, 380px); height: auto; filter: drop-shadow(0 8px 40px rgba(58,123,232,0.4)); animation: floatBadge 4s ease-in-out infinite; }
@keyframes floatBadge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ── Fancy section divider (glowing HR) ──────────────────────────────── */
.mg-divider-glow { position: relative; height: 48px; display: flex; align-items: center; justify-content: center; background: #000; overflow: hidden; }
.mg-divider-glow::before { content: ''; position: absolute; left: 10%; right: 10%; height: 1px; background: linear-gradient(90deg, transparent, rgba(111,181,255,0.6), rgba(58,123,232,0.9), rgba(111,181,255,0.6), transparent); }
.mg-divider-glow::after { content: ''; position: absolute; left: 20%; right: 20%; height: 12px; top: 50%; transform: translateY(-50%); background: radial-gradient(ellipse 50% 100% at 50% 50%, rgba(111,181,255,0.2) 0%, transparent 100%); filter: blur(4px); }

.home-hex { background: var(--mg-canvas-light); padding: 100px 24px; }
.home-hex__inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.home-hex__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.025em; color: var(--mg-ink); margin: 0 0 20px; }
.home-hex__heading em { color: var(--mg-blue); font-style: italic; }
.home-hex__body { font-family: var(--mg-font-body); font-size: 17px; line-height: 1.65; color: #3a3d44; margin: 0 0 28px; }
.home-hex__pills { display: flex; gap: 10px; flex-wrap: wrap; }
.home-hex__pill { font-family: var(--mg-font-mono); font-size: 13px; color: var(--mg-ink); padding: 6px 14px; border: 1px solid var(--mg-hairline-light); border-radius: 9999px; background: #fff; }
.home-hex__diagram { display: flex; align-items: center; justify-content: center; }

.home-engine { background: #000; color: #fff; padding: 100px 24px; position: relative; overflow: hidden; }
.home-engine__bloom { position: absolute; left: 50%; top: 60%; transform: translate(-50%, -50%); width: 1000px; height: 500px; background: radial-gradient(ellipse, rgba(111,181,255,0.18) 0%, transparent 65%); pointer-events: none; filter: blur(40px); }
.home-engine__inner { position: relative; max-width: 1200px; margin: 0 auto; }
.home-engine__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(36px, 5.5vw, 64px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 20px; }
.home-engine__heading em { color: var(--mg-cosmic-glow); font-style: italic; }
.home-engine__body { font-family: var(--mg-font-body); font-size: 18px; line-height: 1.65; color: rgba(255,255,255,0.82); max-width: 600px; margin: 0 0 40px; }
.home-engine__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; max-width: 800px; }
.home-engine__card { padding: 20px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; }
.home-engine__card-title { font-family: var(--mg-font-display); font-weight: 600; font-size: 15px; color: #fff; margin-bottom: 6px; }
.home-engine__card-body { font-family: var(--mg-font-body); font-size: 13px; line-height: 1.5; color: rgba(255,255,255,0.65); }
.home-engine__pills { margin-top: 40px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.home-engine__pill { font-family: var(--mg-font-mono); font-size: 12px; color: rgba(255,255,255,0.6); padding: 6px 14px; border: 1px solid rgba(255,255,255,0.15); border-radius: 9999px; }

.home-bots { background: var(--mg-canvas-light); padding: 100px 24px; }
.home-bots__inner { max-width: 1200px; margin: 0 auto; }
.home-bots__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.025em; color: var(--mg-ink); margin: 0 0 20px; }
.home-bots__heading em { color: var(--mg-blue); font-style: italic; }
.home-bots__body { font-family: var(--mg-font-body); font-size: 17px; line-height: 1.65; color: #3a3d44; max-width: 640px; margin: 0 0 32px; }
.home-bots__btns { display: flex; gap: 12px; flex-wrap: wrap; }

.home-news { background: var(--mg-canvas-light); padding: 140px 24px; border-top: 1px solid var(--mg-hairline-light); }
.home-news__inner { max-width: 1200px; margin: 0 auto; }
.home-news__header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 32px; }
.home-news__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(30px, 4vw, 48px); line-height: 1.1; letter-spacing: -0.4px; color: var(--mg-ink); }
.home-news__link { font-family: var(--mg-font-body); font-weight: 600; font-size: 14px; color: var(--mg-blue); text-decoration: none; }

.news-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; background: #fff; border: 1px solid var(--mg-hairline-light); border-radius: 20px; text-decoration: none; color: inherit; transition: border-color 180ms; }
.news-card:hover { border-color: var(--mg-ink); }
.news-card__header { display: flex; justify-content: space-between; align-items: center; }
.news-card__tag { font-family: var(--mg-font-body); font-weight: 600; font-size: 11px; background: var(--mg-ink); color: #fff; padding: 3px 10px; border-radius: 9999px; }
.news-card__date { font-family: var(--mg-font-mono); font-size: 12px; color: var(--mg-stone); }
.news-card__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 21px; line-height: 1.25; letter-spacing: -0.25px; color: var(--mg-ink); }
.news-card__body { font-family: var(--mg-font-body); font-size: 14px; line-height: 1.55; color: var(--mg-mute); margin: 0; text-wrap: balance; }
.news-card__more { font-family: var(--mg-font-body); font-weight: 600; font-size: 13px; color: var(--mg-blue); margin-top: auto; }

.home-community { position: relative; min-height: 520px; background: #000; color: #fff; overflow: hidden; isolation: isolate; }
.home-community__gradient { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, #1a3680 50%, #0a0d2a 100%); }
.home-community__glow { display: none; }
.home-community__hex { position: absolute; inset: 0; background-size: 56px 64px; opacity: 0.5; }
.home-community__fade { position: absolute; inset: 0; background: linear-gradient(180deg, #000 0%, transparent 20%, transparent 80%, #000 100%); pointer-events: none; }
.home-community__inner { position: relative; z-index: 2; padding: 120px 24px; max-width: 760px; margin: 0 auto; text-align: center; }
.home-community__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(36px, 5.5vw, 72px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 24px; text-shadow: 0 4px 24px rgba(0,0,0,0.6); }
.home-community__body { font-family: var(--mg-font-body); font-size: 18px; line-height: 1.65; color: rgba(255,255,255,0.86); margin: 0 0 36px; text-shadow: 0 2px 14px rgba(0,0,0,0.6); text-wrap: balance; }
.home-community__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Global Search ──────────────────────────────────────────────────── */
.mg-search-trigger {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 180ms ease, background 180ms ease;
}
.mg-search-trigger:hover {
  border-color: var(--mg-cosmic-glow);
  background: rgba(111,181,255,0.08);
}
.mg-search-trigger svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mg-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  opacity: 0;
  transition: opacity 200ms ease;
}
.mg-search-overlay--visible {
  display: flex;
  opacity: 1;
}

.mg-search-panel {
  width: 100%;
  max-width: 620px;
  margin: 0 24px;
  background: #14161c;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  overflow: hidden;
  transform: translateY(-8px);
  transition: transform 200ms cubic-bezier(0.2,0.8,0.2,1);
}
.mg-search-overlay--visible .mg-search-panel {
  transform: translateY(0);
}

.mg-search-panel__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mg-search-panel__icon {
  width: 18px;
  height: 18px;
  stroke: var(--mg-cosmic-glow);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.mg-search-panel__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--mg-font-body);
  font-size: 16px;
  color: #fff;
  caret-color: var(--mg-cosmic-glow);
  padding: 8px 12px;
}
.mg-search-panel__input::placeholder {
  color: rgba(255,255,255,0.4);
}
.mg-search-panel__kbd {
  font-family: var(--mg-font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  padding: 3px 8px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  flex-shrink: 0;
}

.mg-search-panel__results {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}
.mg-search-panel__results::-webkit-scrollbar {
  width: 6px;
}
.mg-search-panel__results::-webkit-scrollbar-track {
  background: transparent;
}
.mg-search-panel__results::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}

.mg-search-result {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  transition: background 120ms ease;
}
.mg-search-result:hover,
.mg-search-result--active {
  background: rgba(111,181,255,0.08);
}
.mg-search-result__type {
  font-family: var(--mg-font-mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}
.mg-search-result__type--mod {
  border-color: var(--mg-green);
  color: var(--mg-green);
}
.mg-search-result__type--game {
  border-color: var(--mg-cosmic-glow);
  color: var(--mg-cosmic-glow);
}
.mg-search-result__type--news {
  border-color: var(--mg-red-bright);
  color: var(--mg-red-bright);
}
.mg-search-result__type--tool {
  border-color: var(--mg-blue-bright);
  color: var(--mg-blue-bright);
}
.mg-search-result__type--rule {
  border-color: var(--mg-red);
  color: var(--mg-red);
}
.mg-search-result__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mg-search-result__title {
  font-family: var(--mg-font-body);
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mg-search-result__desc {
  font-family: var(--mg-font-body);
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mg-search-panel__empty {
  padding: 40px 20px;
  text-align: center;
}
.mg-search-panel__empty-title {
  font-family: var(--mg-font-body);
  font-weight: 600;
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
}
.mg-search-panel__empty-hint {
  font-family: var(--mg-font-body);
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

.mg-search-panel__footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mg-search-panel__footer-hint {
  font-family: var(--mg-font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  display: flex;
  gap: 16px;
}
.mg-search-panel__footer-hint kbd {
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  margin-right: 4px;
}

@media (max-width: 540px) {
  .mg-search-overlay { padding-top: 72px; }
  .mg-search-panel { margin: 0 12px; border-radius: 16px; }
  .mg-search-panel__results { max-height: 320px; }
  .mg-search-panel__footer { display: none; }
}

/* Responsive helpers */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .mg-grid-3 { grid-template-columns: 1fr !important; }
  .mg-grid-2 { grid-template-columns: 1fr !important; }
  .mg-grid-notes { grid-template-columns: 1fr !important; }
  .mg-grid-4 { grid-template-columns: 1fr 1fr !important; }
  .rules-layout { grid-template-columns: 1fr !important; gap: 32px !important; }
  .rules-sidebar { position: static !important; }
  .home-featured__inner { grid-template-columns: 1fr !important; text-align: center; }
  .home-featured__body { margin-left: auto; margin-right: auto; }
  .home-featured__btns { justify-content: center; }
  .home-featured__cube, .home-featured__logo { display: none; }
  .home-hex__inner { grid-template-columns: 1fr !important; gap: 40px !important; }
  .home-hex__diagram { order: -1; }
  .home-featured { padding: 80px 20px; }
  .home-hex { padding: 64px 20px; }
  .home-engine { padding: 64px 20px; }
  .mg-section { padding: 80px 20px; }
  .stats-row { justify-content: center; gap: 16px 24px; }
  .stats-row__divider { display: none; }
  .stats-bar__inner { justify-content: center; gap: 16px 24px; }
  .stats-bar__inner .stats-row__divider { display: none; }

  /* Mobile centering: cards, tags, pills */
  .mod-card__inner { text-align: center; align-items: center; }
  .mod-card__meta { justify-content: center; }
  .mod-card__stats { align-items: center; text-align: center; }
  .mod-card__link { align-self: center; }
  .game-card__body { text-align: center; align-items: center; }
  .game-card__stats { text-align: center; }
  .news-card { text-align: center; }
  .news-card__header { justify-content: center; gap: 12px; }
  .news-card__more { align-self: center; }
  .mg-card { text-align: center; }
  .mg-card--row { flex-direction: column; align-items: center; }
  .mg-card__link { align-self: center; }

  /* Flex pill/tag containers */
  .game-hero__tags { justify-content: center; }
  .game-hero__btns { justify-content: center; }
  .home-hex__pills { justify-content: center; }
  .home-engine__pills { justify-content: center; }
  .home-gallery__filters { justify-content: center; }
  .home-nuke__btns { justify-content: center; }
  .home-community__btns { justify-content: center; }
  .compact-hero__stats { justify-content: center; }
  .post-share-btns { justify-content: center; }

  /* Body sub / lede centering */
  .mg-body-sub { margin-left: auto; margin-right: auto; text-align: center; }
  .mg-heading-xl { text-align: center; }
  .mg-heading-lg { text-align: center; }
  .mg-heading-md { text-align: center; }

  /* Eyebrows center */
  .mg-eyebrow { display: flex; justify-content: center; }

  /* Game/mod hero mobile centering */
  .game-hero__inner { grid-template-columns: 1fr; text-align: center; padding: 64px 20px 80px; }
  .game-hero__text { align-items: center; }
  .game-hero__lede { margin-left: auto; margin-right: auto; }
  .game-hero__tags { justify-content: center; }
  .game-hero__btns { justify-content: center; }
  .game-hero__logo { justify-self: center; }

  /* Compact hero (community mods) */
  .compact-hero__inner { text-align: center; padding: 48px 20px 64px; }
  .compact-hero__lede { margin-left: auto; margin-right: auto; }
  .compact-hero__stats { justify-content: center; }

  /* Stats bar */
  .stats-bar__inner { justify-content: center; flex-wrap: wrap; }

  /* Related heading */
  .related-heading { text-align: center; }
  .community-header { flex-direction: column; align-items: center; text-align: center; }
  .community-header__link { align-self: center; }

  /* Rules layout */
  .rules-layout { grid-template-columns: 1fr !important; gap: 32px !important; }
  .rules-sidebar { display: none !important; }

  /* Rules sections */
  .rules-section__num { text-align: center; }
  .rules-section__title { text-align: center; }
  .rules-section__body { margin-left: auto; margin-right: auto; text-align: center; }

  /* Rules list (community mods) */
  .rules-list__item { text-align: center; }
  .rules-list__num { text-align: center; }
  .rules-list__title { text-align: center; }
  .rules-list__body { text-align: center; }

  /* Source/license footer */
  .mod-source { justify-content: center; text-align: center; }

  /* Section padding */
  .mg-section--tight { padding: 56px 20px; }
}
@media (max-width: 540px) {
  .mg-grid-4 { grid-template-columns: 1fr !important; }
  section, .section-pad { padding-left: 16px !important; padding-right: 16px !important; }
  .prose blockquote { margin-left: 0; margin-right: 0; padding: 16px 18px; border-radius: 0 12px 12px 0; }
  .prose-callout { margin-left: 0; margin-right: 0; padding: 16px 18px; border-radius: 0 12px 12px 0; }
  .prose p.lede { padding: 20px 20px; border-radius: 12px; }
  .prose p.lede::before { display: none; }
}

/* navbar.css */
.mg-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
}

.mg-navbar__header {
  height: 64px;
  background: #000;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
  box-sizing: border-box;
}

.mg-navbar__logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.mg-navbar__logo-img {
  height: 32px;
  width: auto;
}

.mg-navbar__nav {
  display: flex;
  gap: 24px;
  margin-left: 12px;
}

.mg-navbar__item {
  position: relative;
}

.mg-navbar__link {
  font-family: var(--mg-font-body);
  font-weight: 500;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
}

.mg-navbar__link--active {
  color: #fff;
}

.mg-navbar__active-bar {
  position: absolute;
  bottom: -22px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--mg-cosmic-glow);
}

/* Dropdown */
.mg-navbar__dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding-top: 12px;
  display: none;
  z-index: 100;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms cubic-bezier(.2,.8,.2,1);
}

.mg-navbar__dropdown--visible {
  display: block;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mg-navbar__dropdown-menu {
  background: #14161c;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 10px 0;
  min-width: 200px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(111,181,255,0.06);
  backdrop-filter: blur(12px);
}

.mg-navbar__dropdown-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-family: var(--mg-font-body);
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: all 150ms cubic-bezier(.2,.8,.2,1);
  border-left: 2px solid transparent;
  margin: 0 6px;
  border-radius: 6px;
}

.mg-navbar__dropdown-link:hover {
  background: color-mix(in srgb, var(--nav-accent, var(--mg-cosmic-glow)) 8%, transparent);
  border-left-color: var(--nav-accent, var(--mg-cosmic-glow));
  color: #fff;
  padding-left: 20px;
}
.mg-navbar__dropdown-link--active {
  color: #fff;
  font-weight: 600;
  border-left-color: var(--nav-accent, var(--mg-cosmic-glow));
  background: color-mix(in srgb, var(--nav-accent, var(--mg-cosmic-glow)) 6%, transparent);
}

/* Right section */
.mg-navbar__right {
  margin-left: auto;
  display: flex;
  gap: 12px;
  align-items: center;
}

.mg-navbar__discord {
  font-family: var(--mg-font-pixel);
  font-size: 8px;
  color: var(--mg-cosmic-glow);
  letter-spacing: 1.5px;
  text-decoration: none;
}

/* Hamburger */
.mg-navbar__hamburger {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 9999px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Mobile drawer */
.mg-navbar__drawer {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  z-index: 49;
  padding: 32px 24px;
  overflow-y: auto;
  display: none;
}

.mg-navbar__drawer--open {
  display: block;
}

.mg-navbar__drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mg-navbar__drawer-link {
  font-family: var(--mg-font-body);
  font-weight: 600;
  font-size: 20px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  padding: 12px 0;
  display: block;
}

.mg-navbar__drawer-link--active {
  color: #fff;
}

.mg-navbar__drawer-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 8px 16px;
  border-left: 1px solid rgba(255,255,255,0.1);
  margin-left: 8px;
}

.mg-navbar__drawer-sub-link {
  font-family: var(--mg-font-body);
  font-weight: 400;
  font-size: 15px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  padding: 8px 0;
  display: block;
}

.mg-navbar__drawer-sub-link:hover {
  color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
  .mg-navbar__nav,
  .mg-navbar__right {
    display: none !important;
  }
  .mg-navbar__hamburger {
    display: flex !important;
  }
}

@media (min-width: 901px) {
  .mg-navbar__drawer {
    display: none !important;
  }
}

/* footer.css */
.mg-footer {
  background: #000;
  color: #fff;
  padding: 80px 24px 40px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.mg-footer__hex {
  position: absolute;
  inset: 0;
  background-size: 56px 64px;
  opacity: 0.04;
  pointer-events: none;
}

.mg-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.mg-footer__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 32px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

@media (max-width: 900px) {
  .mg-footer__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 24px;
  }
}

@media (max-width: 768px) {
  .mg-footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .mg-footer__grid > * {
    text-align: center !important;
  }
  .mg-footer__grid > * .mg-footer__col-list {
    align-items: center !important;
  }
  .mg-footer__grid > :first-child .mg-footer__tagline {
    margin-left: auto;
    margin-right: auto;
  }
  .mg-footer__grid > :first-child .mg-footer__logo-wrap {
    justify-content: center;
  }
  .mg-footer__bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.mg-footer__logo-wrap {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.mg-footer__logo {
  height: 28px;
  width: auto;
}

.mg-footer__tagline {
  font-family: var(--mg-font-body);
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.4);
  max-width: 280px;
  margin: 0;
}

.mg-footer__col-title {
  font-family: var(--mg-font-body);
  font-weight: 600;
  font-size: 12px;
  color: #fff;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.mg-footer__col-title-link {
  color: inherit;
  text-decoration: none;
}
.mg-footer__col-title-link:hover {
  color: rgba(255,255,255,0.8);
  text-decoration: underline;
}

.mg-footer__col-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mg-footer__col-link {
  font-family: var(--mg-font-body);
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 150ms;
}
.mg-footer__col-link:hover {
  color: #fff;
}

.mg-footer__grid > :not(:first-child):not(:last-child) { text-align: center; }
.mg-footer__grid > :not(:first-child):not(:last-child) .mg-footer__col-list { align-items: center; }
.mg-footer__grid > :last-child { text-align: right; }
.mg-footer__grid > :last-child .mg-footer__col-list { align-items: flex-end; }

.mg-footer__bottom {
  padding-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mg-font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
}

/* hero.css */
/* ── Hero System — Tier 1 & Tier 2 ──────────────────────────────────── */

/* Shared hero container */
.mg-hero {
  position: relative;
  background: #000;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.mg-hero--tier1 {
  min-height: 580px;
}
.mg-hero--tier2 {
  min-height: 400px;
}

/* Gradient background layer */
.mg-hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--hero-deep, #0a0d2a) 0%, var(--hero-mid, #1a3680) 45%, #000 100%);
}

/* Hexland landscape (tier 1 only) */
.mg-hero__land {
  position: absolute;
  inset: 0;
  background: url('../img/hex-land.jpg') center 70% / cover no-repeat;
  opacity: 0.18;
  mix-blend-mode: screen;
  mask-image: linear-gradient(180deg, transparent 0%, black 30%, black 60%, transparent 90%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 30%, black 60%, transparent 90%);
  will-change: transform;
  transform-origin: center bottom;
}

/* Hex grid overlay — parallax target */
.mg-hero__hex {
  position: absolute;
  inset: -20% 0;
  background-size: 56px 64px;
  animation: hexFloat 30s linear infinite;
  pointer-events: none;
  will-change: transform;
}

/* Tinted hex overlays */
.mg-hero__hex--blue { background-image: url('../img/hex-grid-blue.svg'); }
.mg-hero__hex--green { background-image: url('../img/hex-grid-green.svg'); }
.mg-hero__hex--red { background-image: url('../img/hex-grid-red.svg'); }
.mg-hero__hex--white { background-image: url('../img/hex-grid-white.svg'); }
.mg-hero__hex--purple { background-image: url('../img/hex-grid-purple.svg'); }
.mg-hero__hex--cyan { background-image: url('../img/hex-grid-cyan.svg'); }
.mg-hero__hex--magenta { background-image: url('../img/hex-grid-magenta.svg'); }
.mg-hero__hex--amber { background-image: url('../img/hex-grid-amber.svg'); }

/* Fade overlays */
.mg-hero__fade-top {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,10,30,0.5) 0%, transparent 40%);
  z-index: 2;
  pointer-events: none;
}
.mg-hero__fade-bottom {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.6) 85%, #000 100%);
  z-index: 2;
  pointer-events: none;
}

/* Accent glow — positioned center-bottom for tier 1 */
.mg-hero__glow {
  position: absolute;
  left: 50%;
  bottom: -80px;
  transform: translateX(-50%);
  width: 900px;
  height: 400px;
  pointer-events: none;
  filter: blur(30px);
  background: radial-gradient(ellipse, var(--hero-glow, rgba(111,181,255,0.3)) 0%, transparent 65%);
  will-change: transform, opacity;
  transform-origin: center center;
}

/* Content layer */
.mg-hero__content {
  position: relative;
  z-index: 5;
  padding: 140px 32px 120px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  box-sizing: border-box;
  will-change: transform, opacity;
}
.mg-hero--tier2 .mg-hero__content {
  padding: 88px 32px 80px;
}

.mg-hero__eyebrow {
  font-family: var(--mg-font-pixel);
  font-size: 10px;
  letter-spacing: 1.5px;
  margin-bottom: 18px;
  color: var(--hero-accent, var(--mg-cosmic-glow));
  text-shadow: 0 0 12px var(--hero-accent-alpha, rgba(111,181,255,0.55));
}
.mg-hero__title {
  font-family: var(--mg-font-display);
  font-weight: 600;
  font-size: clamp(48px, 7vw, 100px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  text-shadow: 0 4px 40px rgba(0,0,0,0.6);
  text-wrap: balance;
}
.mg-hero--tier2 .mg-hero__title {
  font-size: clamp(40px, 5.5vw, 72px);
}
.mg-hero__title em {
  color: var(--hero-accent, var(--mg-cosmic-glow));
  font-style: normal;
}
.mg-hero__lede {
  font-family: var(--mg-font-body);
  font-size: 19px;
  line-height: 1.65;
  color: rgba(255,255,255,0.86);
  max-width: 800px;
  margin: 0 auto;
  text-shadow: 0 2px 16px rgba(0,0,0,0.7);
  text-wrap: balance;
}
.mg-hero--tier2 .mg-hero__lede {
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto;
}
.mg-hero__btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

/* ── Feature element layout (hero with side graphic) ────────────────── */
.mg-hero--has-feature .mg-hero__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
  text-align: left;
}
.mg-hero__text {
  flex: 1;
  min-width: 0;
}
.mg-hero__feature {
  flex: none;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mg-hero--has-feature .mg-hero__lede {
  margin: 0;
}
@media (max-width: 768px) {
  .mg-hero--has-feature .mg-hero__content {
    flex-direction: column;
    text-align: center;
  }
  .mg-hero__feature {
    width: 140px;
    height: 140px;
    order: -1;
  }
  .mg-hero--has-feature .mg-hero__lede {
    margin: 0 auto;
  }
}

/* ── Floating SVG elements layer ────────────────────────────────────── */
.mg-hero__floats {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}
.mg-hero__float {
  position: absolute;
  opacity: 0;
  animation: heroFloat var(--float-dur, 18s) var(--float-delay, 0s) ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes heroFloat {
  0% {
    opacity: 0;
    transform: translate(var(--fx, 0px), var(--fy, 0px)) rotate(var(--fr, 0deg)) scale(0.8);
  }
  8% { opacity: var(--fo, 0.18); }
  50% {
    transform: translate(calc(var(--fx, 0px) + var(--fdx, 20px)), calc(var(--fy, 0px) + var(--fdy, -40px))) rotate(calc(var(--fr, 0deg) + var(--frot, 15deg))) scale(1);
  }
  92% { opacity: var(--fo, 0.18); }
  100% {
    opacity: 0;
    transform: translate(calc(var(--fx, 0px) + var(--fdx2, -10px)), calc(var(--fy, 0px) + var(--fdy2, -60px))) rotate(calc(var(--fr, 0deg) + var(--frot2, 30deg))) scale(0.85);
  }
}

/* Slower orbit variant for engines cog */
@keyframes heroOrbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes heroPulse {
  0%, 100% { opacity: var(--fo, 0.15); transform: scale(1); }
  50% { opacity: calc(var(--fo, 0.15) * 1.4); transform: scale(1.06); }
}

/* ── Section-specific accent vars ───────────────────────────────────── */
.mg-hero--mods {
  --hero-accent: #e63232;
  --hero-accent-alpha: rgba(230,50,50,0.55);
  --hero-glow: rgba(209,26,26,0.35);
  --hero-mid: #5c1010;
}
.mg-hero--games {
  --hero-accent: #e8a91a;
  --hero-accent-alpha: rgba(232,169,26,0.55);
  --hero-glow: rgba(232,169,26,0.35);
  --hero-mid: #5c4310;
}
.mg-hero--tools {
  --hero-accent: #3a9928;
  --hero-accent-alpha: rgba(58,153,40,0.55);
  --hero-glow: rgba(58,153,40,0.35);
  --hero-mid: #1a5e10;
}
.mg-hero--news {
  --hero-accent: #e11d89;
  --hero-accent-alpha: rgba(225,29,137,0.55);
  --hero-glow: rgba(225,29,137,0.3);
  --hero-mid: #5c0f3a;
}
.mg-hero--engines {
  --hero-accent: #06b6d4;
  --hero-accent-alpha: rgba(6,182,212,0.55);
  --hero-glow: rgba(6,182,212,0.35);
  --hero-mid: #0e4f5c;
}
.mg-hero--developers {
  --hero-accent: #8b5cf6;
  --hero-accent-alpha: rgba(139,92,246,0.55);
  --hero-glow: rgba(139,92,246,0.35);
  --hero-mid: #3b1a80;
}
.mg-hero--about {
  --hero-accent: #6fb5ff;
  --hero-accent-alpha: rgba(111,181,255,0.55);
  --hero-glow: rgba(111,181,255,0.25);
}

/* Sub-page tints */
.mg-hero--submit {
  --hero-accent: #e63232;
  --hero-accent-alpha: rgba(230,50,50,0.55);
  --hero-glow: rgba(209,26,26,0.25);
  --hero-mid: #5c1010;
}
.mg-hero--team {
  --hero-accent: #6fb5ff;
  --hero-accent-alpha: rgba(111,181,255,0.55);
  --hero-glow: rgba(111,181,255,0.2);
}
.mg-hero--roadmap {
  --hero-accent: #6fb5ff;
  --hero-accent-alpha: rgba(111,181,255,0.55);
  --hero-glow: rgba(111,181,255,0.2);
}
.mg-hero--community {
  --hero-accent: #6fb5ff;
  --hero-accent-alpha: rgba(111,181,255,0.55);
  --hero-glow: rgba(111,181,255,0.25);
}
.mg-hero--press {
  --hero-accent: #6fb5ff;
  --hero-accent-alpha: rgba(111,181,255,0.55);
  --hero-glow: rgba(111,181,255,0.2);
}

/* Tool sub-page tints — inherit green from Tools parent */
.mg-hero--tool-ti {
  --hero-accent: #3a9928;
  --hero-accent-alpha: rgba(58,153,40,0.55);
  --hero-glow: rgba(58,153,40,0.25);
  --hero-mid: #1a5e10;
}
.mg-hero--tool-talisman {
  --hero-accent: #3a9928;
  --hero-accent-alpha: rgba(58,153,40,0.55);
  --hero-glow: rgba(58,153,40,0.25);
  --hero-mid: #1a5e10;
}
.mg-hero--tool-nukes {
  --hero-accent: #3a9928;
  --hero-accent-alpha: rgba(58,153,40,0.55);
  --hero-glow: rgba(58,153,40,0.25);
  --hero-mid: #1a5e10;
}
.mg-hero--tool-dice {
  --hero-accent: #3a9928;
  --hero-accent-alpha: rgba(58,153,40,0.55);
  --hero-glow: rgba(58,153,40,0.25);
  --hero-mid: #1a5e10;
}
.mg-hero--tool-decks {
  --hero-accent: #3a9928;
  --hero-accent-alpha: rgba(58,153,40,0.55);
  --hero-glow: rgba(58,153,40,0.25);
  --hero-mid: #1a5e10;
}
.mg-hero--tool-chess {
  --hero-accent: #3a9928;
  --hero-accent-alpha: rgba(58,153,40,0.55);
  --hero-glow: rgba(58,153,40,0.25);
  --hero-mid: #1a5e10;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .mg-hero--tier1 { min-height: 480px; }
  .mg-hero--tier2 { min-height: 340px; }
  .mg-hero__content { padding: 100px 20px 88px; }
  .mg-hero--tier2 .mg-hero__content { padding: 64px 20px 56px; }
  .mg-hero__float { display: none; }
}

/* ── Reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .mg-hero__hex { animation: none; }
  .mg-hero__float { animation: none; opacity: var(--fo, 0.12) !important; }
}

/* hero-features.css */
/* ── Hero Feature Objects — 3D spinning cubes per section ────────────── */

.hero-obj {
  width: 120px;
  height: 120px;
  position: relative;
  transform-style: preserve-3d;
  animation: heroSpin 8s linear infinite;
  margin: 0 auto;
}
@keyframes heroSpin {
  0% { transform: rotateX(15deg) rotateY(0deg); }
  100% { transform: rotateX(15deg) rotateY(360deg); }
}

.hero-obj__face {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 14px;
  background: #14161c;
  border: 2px solid var(--obj-stroke, rgba(255,255,255,0.2));
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-obj__face--front  { transform: translateZ(60px); }
.hero-obj__face--back   { transform: rotateY(180deg) translateZ(60px); }
.hero-obj__face--left   { transform: rotateY(-90deg) translateZ(60px); }
.hero-obj__face--right  { transform: rotateY(90deg) translateZ(60px); }
.hero-obj__face--top    { transform: rotateX(90deg) translateZ(60px); }
.hero-obj__face--bottom { transform: rotateX(-90deg) translateZ(60px); }

/* ── MODS: Cube with rulebook pages on faces ────────────────────────── */
.hero-obj--mods { --obj-stroke: rgba(230,50,50,0.35); }
.mods-face-icon {
  width: 60px;
  height: 60px;
  stroke: var(--mg-red-bright);
  fill: none;
  stroke-width: 1.5;
  opacity: 0.8;
  animation: modsDocSpin 8s linear infinite;
}
@keyframes modsDocSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

/* ── MODS: CSS clip-path shape morph ────────────────────────────────── */
.mods-anim-wrap {
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mods-morph {
  width: 220px;
  height: 220px;
  position: relative;
  animation: modMorphFloat 8s ease-in-out infinite;
}
@keyframes modMorphFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(4deg); }
}
.mods-morph__glow {
  position: absolute;
  inset: -50px;
  background: radial-gradient(circle, rgba(230,50,50,0.35) 0%, transparent 60%);
  animation: morphGlowPulse 10s ease-in-out infinite;
}
@keyframes morphGlowPulse {
  0%, 20% { opacity: 0.4; transform: scale(1); }
  30% { opacity: 1; transform: scale(1.15); }
  40%, 55% { opacity: 0.4; transform: scale(1); }
  63% { opacity: 1; transform: scale(1.15); }
  73%, 100% { opacity: 0.4; transform: scale(1); }
}
.mods-morph__ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(230,50,50,0.5);
  animation: clipMorph 10s ease-in-out infinite;
}
.mods-morph__ring--1 {
  inset: -6px;
  border-color: rgba(230,50,50,0.4);
  animation-delay: -0.3s;
}
.mods-morph__ring--2 {
  inset: -16px;
  border-color: rgba(230,50,50,0.25);
  animation-delay: -0.7s;
}
.mods-morph__ring--3 {
  inset: -28px;
  border-color: rgba(230,50,50,0.12);
  animation-delay: -1.1s;
}
.mods-morph__shape {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(230,50,50,0.4) 0%, rgba(180,20,20,0.15) 100%);
  box-shadow: inset 0 0 0 3px rgba(230,50,50,0.9);
  animation: clipMorph 10s ease-in-out infinite;
}

/* 12-point polygon — same vertex count in every keyframe.
   Square → Circle → Hexagon (flat-top) → back to square */
@keyframes clipMorph {
  0%, 8% {
    clip-path: polygon(
      12% 12%, 50% 12%, 88% 12%, 88% 12%,
      88% 50%, 88% 88%, 88% 88%,
      50% 88%, 12% 88%, 12% 88%,
      12% 50%, 12% 12%
    );
  }
  33%, 42% {
    clip-path: polygon(
      50% 0%, 75% 7%, 93% 25%, 100% 50%,
      93% 75%, 75% 93%, 50% 100%,
      25% 93%, 7% 75%, 0% 50%,
      7% 25%, 25% 7%
    );
  }
  66%, 75% {
    clip-path: polygon(
      50% 0%, 50% 0%, 93% 25%, 93% 25%,
      93% 75%, 93% 75%, 50% 100%,
      50% 100%, 7% 75%, 7% 75%,
      7% 25%, 7% 25%
    );
  }
  93%, 100% {
    clip-path: polygon(
      12% 12%, 50% 12%, 88% 12%, 88% 12%,
      88% 50%, 88% 88%, 88% 88%,
      50% 88%, 12% 88%, 12% 88%,
      12% 50%, 12% 12%
    );
  }
}

/* ── GAMES: Cube with d20 numbers on faces ──────────────────────────── */
.hero-obj--games { --obj-stroke: rgba(232,169,26,0.4); }
.games-face-num {
  font-family: var(--mg-font-display);
  font-weight: 700;
  font-size: 42px;
  color: #e8a91a;
  opacity: 0.85;
  text-shadow: 0 0 12px rgba(232,169,26,0.4);
}

/* ── ENGINES: Cube with gear on faces, slower spin ──────────────────── */
.hero-obj--engines {
  --obj-stroke: rgba(6,182,212,0.35);
  animation-duration: 12s;
}
.engines-face-icon {
  width: 70px;
  height: 70px;
  color: #06b6d4;
  opacity: 0.8;
  animation: gearCounterSpin 12s linear infinite;
}
@keyframes gearCounterSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

/* ── ABOUT: Tri-colour cube (R/G/B gradient faces) ──────────────────── */
.hero-obj--about { --obj-stroke: transparent; }
.hero-obj--about .hero-obj__face {
  border: none;
  background: transparent;
}
.cube-face-fill {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  opacity: 0.85;
}
.cube-face-fill--red { background: linear-gradient(135deg, #14161c, #d11a1a); border: 2px solid rgba(209,26,26,0.4); }
.cube-face-fill--green { background: linear-gradient(135deg, #14161c, #3a9928); border: 2px solid rgba(58,153,40,0.4); }
.cube-face-fill--blue { background: linear-gradient(135deg, #14161c, #0c4f8d); border: 2px solid rgba(12,79,141,0.4); }

/* ── GAMES: Animated SVG (hex board with pieces) ────────────────────── */
.games-anim-wrap {
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.games-anim-svg {
  width: 260px;
  height: 260px;
}
.games-anim-svg .hex-cell {
  fill: none;
  stroke: #e8a91a;
  stroke-width: 0.8;
  opacity: 0.3;
}
.games-anim-svg .hex-cell--lit {
  fill: rgba(232,169,26,0.08);
  opacity: 0.7;
  animation: hexPulse 4s ease-in-out infinite;
}
.games-anim-svg .hex-cell--lit:nth-child(2) { animation-delay: 0.8s; }
.games-anim-svg .hex-cell--lit:nth-child(3) { animation-delay: 1.6s; }
.games-anim-svg .hex-cell--lit:nth-child(4) { animation-delay: 2.4s; }
@keyframes hexPulse {
  0%, 100% { fill: rgba(232,169,26,0.06); opacity: 0.5; }
  50% { fill: rgba(232,169,26,0.18); opacity: 0.9; }
}
.games-anim-svg .piece {
  fill: #e8a91a;
  opacity: 0;
  animation: pieceDrop 5s ease-out infinite;
}
.games-anim-svg .piece:nth-child(1) { animation-delay: 0s; }
.games-anim-svg .piece:nth-child(2) { animation-delay: 1.2s; }
.games-anim-svg .piece:nth-child(3) { animation-delay: 2.5s; }
@keyframes pieceDrop {
  0% { opacity: 0; transform: translateY(-8px) scale(0.6); }
  12% { opacity: 0.9; transform: translateY(0) scale(1); }
  70% { opacity: 0.9; transform: translateY(0) scale(1); }
  85% { opacity: 0; transform: translateY(3px) scale(0.8); }
  100% { opacity: 0; }
}
.games-anim-svg .move-path {
  stroke: #e8a91a;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  fill: none;
  opacity: 0.6;
  animation: moveDraw 5s ease-in-out infinite;
  animation-delay: 1.5s;
}
@keyframes moveDraw {
  0%, 10% { stroke-dashoffset: 30; opacity: 0; }
  20% { opacity: 0.6; }
  50% { stroke-dashoffset: 0; opacity: 0.6; }
  70% { opacity: 0; stroke-dashoffset: 0; }
  100% { opacity: 0; stroke-dashoffset: 0; }
}
.games-anim-svg .board-group {
  animation: boardFloat 7s ease-in-out infinite;
}
@keyframes boardFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(1deg); }
}

/* ── NEWS: Animated SVG (not a cube) ────────────────────────────────── */
.news-anim-wrap {
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-anim-svg {
  width: 240px;
  height: 240px;
}
.news-anim-svg .doc-body {
  fill: none;
  stroke: #e11d89;
  stroke-width: 1.2;
  opacity: 0.7;
}
.news-anim-svg .doc-fold {
  fill: rgba(225,29,137,0.15);
  stroke: #e11d89;
  stroke-width: 1.2;
}
.news-anim-svg .doc-line {
  stroke: #e11d89;
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0;
  animation: newsLineIn 3s ease-out infinite;
}
.news-anim-svg .doc-line:nth-child(1) { animation-delay: 0s; }
.news-anim-svg .doc-line:nth-child(2) { animation-delay: 0.3s; }
.news-anim-svg .doc-line:nth-child(3) { animation-delay: 0.6s; }
.news-anim-svg .doc-line:nth-child(4) { animation-delay: 0.9s; }
.news-anim-svg .doc-line:nth-child(5) { animation-delay: 1.2s; }
.news-anim-svg .doc-headline {
  stroke: #e11d89;
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0;
  animation: newsLineIn 3s ease-out infinite;
  animation-delay: 0s;
}
@keyframes newsLineIn {
  0% { opacity: 0; stroke-dashoffset: 40; }
  15% { opacity: 0.8; stroke-dashoffset: 0; }
  70% { opacity: 0.8; }
  100% { opacity: 0; }
}
.news-anim-svg .doc-cursor {
  fill: #e11d89;
  opacity: 0;
  animation: newsCursorBlink 1s step-end infinite;
}
@keyframes newsCursorBlink {
  0%, 50% { opacity: 0.9; }
  51%, 100% { opacity: 0; }
}
.news-anim-svg .doc-float {
  animation: newsFloat 6s ease-in-out infinite;
}
@keyframes newsFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(1.5deg); }
}

/* ── Shared perspective container ───────────────────────────────────── */
.hero-obj-wrap {
  perspective: 600px;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Developers SVG ────────────────────────────────────────────────── */
.dev-anim-wrap {
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dev-anim-svg {
  width: 240px;
  height: 240px;
}
.dev-anim-svg .doc-body {
  fill: none;
  stroke: #8b5cf6;
  stroke-width: 1.2;
  opacity: 0.7;
}
.dev-anim-svg .doc-line {
  stroke: #8b5cf6;
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0;
  animation: newsLineIn 3s ease-out infinite;
}
.dev-anim-svg .doc-line:nth-child(2) { animation-delay: 0.2s; }
.dev-anim-svg .doc-line:nth-child(3) { animation-delay: 0.4s; }
.dev-anim-svg .doc-line:nth-child(4) { animation-delay: 0.6s; }
.dev-anim-svg .doc-line:nth-child(5) { animation-delay: 0.8s; }
.dev-anim-svg .dev-bracket {
  fill: #8b5cf6;
  font-family: var(--mg-font-mono);
  font-weight: 700;
  opacity: 0.9;
}
.dev-anim-svg .doc-cursor {
  fill: #8b5cf6;
  animation: newsCursorBlink 1s step-end infinite;
}
.dev-anim-svg .doc-float {
  animation: newsFloat 6s ease-in-out infinite;
}

/* ── Reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-obj { animation: none; transform: rotateX(15deg) rotateY(-25deg); }
  .gear-svg { animation: none; }
}

/* tools.css */
body { background: #f5f4ef; }

/* Hero */
.tools-hero { background: #000; color: #fff; padding: 64px 32px 88px; position: relative; overflow: hidden; }
.tools-hero__bloom { position: absolute; left: -150px; top: 30%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(58,123,232,0.22) 0%, transparent 65%); pointer-events: none; }
.tools-hero__inner { max-width: 1200px; margin: 0 auto; position: relative; display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.tools-hero__text { flex: 1; min-width: 0; }
.tools-hero__title { font-family: var(--mg-font-display); font-weight: 600; font-size: clamp(48px, 6vw, 88px); line-height: 1.0; letter-spacing: -0.025em; margin: 0 0 24px; max-width: 900px; }
.tools-hero__lede { font-family: var(--mg-font-body); font-size: 18px; line-height: 1.55; color: rgba(255,255,255,0.78); max-width: 600px; margin: 0; }
.tools-hero__dice { flex: none; width: 200px; height: 200px; perspective: 600px; }

/* 3D Dice */
.dice3d { width: 120px; height: 120px; position: relative; transform-style: preserve-3d; animation: diceSpin 8s linear infinite; margin: 40px auto; }
@keyframes diceSpin {
  0% { transform: rotateX(15deg) rotateY(0deg); }
  100% { transform: rotateX(15deg) rotateY(360deg); }
}
.dice3d__face { position: absolute; width: 120px; height: 120px; border-radius: 14px; background: #14161c; border: 2px solid rgba(111,181,255,0.3); display: grid; padding: 20px; box-sizing: border-box; }
.dice3d__face--front  { transform: translateZ(60px); grid-template: 1fr / 1fr; place-items: center; }
.dice3d__face--back   { transform: rotateY(180deg) translateZ(60px); grid-template: repeat(3,1fr) / repeat(2,1fr); place-items: center; }
.dice3d__face--top    { transform: rotateX(90deg) translateZ(60px); grid-template: 1fr 1fr 1fr / 1fr; }
.dice3d__face--bottom { transform: rotateX(-90deg) translateZ(60px); grid-template: repeat(2,1fr) / repeat(2,1fr); place-items: center; }
.dice3d__face--right  { transform: rotateY(90deg) translateZ(60px); }
.dice3d__face--left   { transform: rotateY(-90deg) translateZ(60px); grid-template: 1fr / 1fr; }
.dice3d__face--top .pip:nth-child(1) { justify-self: end; align-self: start; }
.dice3d__face--top .pip:nth-child(2) { justify-self: center; align-self: center; }
.dice3d__face--top .pip:nth-child(3) { justify-self: start; align-self: end; }
.dice3d__face--right { display: grid; grid-template: repeat(3,1fr) / repeat(3,1fr); place-items: center; padding: 18px; }
.dice3d__face--right .pip:nth-child(1) { grid-row: 1; grid-column: 1; }
.dice3d__face--right .pip:nth-child(2) { grid-row: 1; grid-column: 3; }
.dice3d__face--right .pip:nth-child(3) { grid-row: 2; grid-column: 2; }
.dice3d__face--right .pip:nth-child(4) { grid-row: 3; grid-column: 1; }
.dice3d__face--right .pip:nth-child(5) { grid-row: 3; grid-column: 3; }
.dice3d__face--left { display: grid; grid-template: 1fr 1fr / 1fr; }
.dice3d__face--left .pip:nth-child(1) { justify-self: center; align-self: start; margin-top: 8px; }
.dice3d__face--left .pip:nth-child(2) { justify-self: center; align-self: end; margin-bottom: 8px; }
.pip { width: 16px; height: 16px; border-radius: 50%; background: var(--mg-green); }
.dice3d__face { border-color: rgba(58,153,40,0.3); }
.pip { animation: pipSpin 8s linear infinite reverse; }
@keyframes pipSpin {
  from { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.3); }
  to { transform: rotate(360deg) scale(1); }
}

/* Filter pill buttons (used inside tool cards) */
.tools-filter__btn { font-family: var(--mg-font-body); font-weight: 600; font-size: 13px; height: 36px; padding: 0 16px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); background: transparent; color: var(--mg-ink); cursor: pointer; transition: all 150ms; }
.tools-filter__btn:hover { border-color: var(--mg-ink); }
.tools-filter__btn--active { background: var(--mg-ink); color: #fff; border-color: var(--mg-ink); }

/* Jump nav */
.tools-jumpnav { background: var(--mg-canvas-light); border-bottom: 1px solid var(--mg-hairline-light); position: sticky; top: 64px; z-index: 40; padding: 12px 32px; }
.tools-jumpnav__inner { max-width: 960px; margin: 0 auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tools-jumpnav__link { font-family: var(--mg-font-body); font-weight: 600; font-size: 13px; height: 32px; padding: 0 14px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); background: transparent; color: var(--mg-ink); cursor: pointer; transition: all 150ms; text-decoration: none; display: inline-flex; align-items: center; }
.tools-jumpnav__link:hover { border-color: var(--mg-ink); }
.tools-jumpnav__link.active { background: var(--mg-ink); color: #fff; border-color: var(--mg-ink); }
.tools-jumpnav__link--red { border-color: var(--mg-red); color: var(--mg-red); }
.tools-jumpnav__link--red:hover, .tools-jumpnav__link--red.active { background: var(--mg-red); color: #fff; border-color: var(--mg-red); }
.tools-jumpnav__link--blue { border-color: var(--mg-blue); color: var(--mg-blue); }
.tools-jumpnav__link--blue:hover, .tools-jumpnav__link--blue.active { background: var(--mg-blue); color: #fff; border-color: var(--mg-blue); }
.tools-jumpnav__link--green { border-color: var(--mg-green); color: var(--mg-green); }
.tools-jumpnav__link--green:hover, .tools-jumpnav__link--green.active { background: var(--mg-green); color: #fff; border-color: var(--mg-green); }
.tools-jumpnav__link--purple { border-color: #5d2a8a; color: #5d2a8a; }
.tools-jumpnav__link--purple:hover, .tools-jumpnav__link--purple.active { background: #5d2a8a; color: #fff; border-color: #5d2a8a; }
.tools-jumpnav__link--orange { border-color: #e89a1a; color: #e89a1a; }
.tools-jumpnav__link--orange:hover, .tools-jumpnav__link--orange.active { background: #e89a1a; color: #fff; border-color: #e89a1a; }

/* Body + grid */
.tools-body { background: var(--mg-canvas-light); padding: 48px 32px 88px; }
.tools-body__inner { max-width: 960px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }
.tools-body__inner--narrow { max-width: 900px; gap: 24px; }
.tools-body__inner--wide { max-width: 1200px; gap: 24px; }
.tools-embed-section { padding: 0 32px 88px; }
.tools-embed-section__inner { max-width: 900px; margin: 0 auto; }
.tools-grid { display: flex; flex-direction: column; gap: 20px; }
.tools-section-header { margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--mg-hairline-light); scroll-margin-top: 128px; }
.tools-section-header:first-child { margin-top: 0; padding-top: 0; border-top: none; scroll-margin-top: 128px; }
.tools-section__heading { font-family: var(--mg-font-display); font-weight: 600; font-size: 28px; line-height: 1.15; letter-spacing: -0.4px; color: var(--mg-ink); margin: 0 0 6px; text-align: center; }
.tools-section__heading--red { color: var(--mg-red); }
.tools-section__heading--green { color: var(--mg-green); }
.tools-section__heading--blue { color: var(--mg-blue); }
.tools-section__sub { font-family: var(--mg-font-body); font-size: 15px; color: var(--mg-mute); margin: 0 0 20px; text-align: center; }
.tool-card--featured { scroll-margin-top: 120px; }
.tools-section { scroll-margin-top: 120px; margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--mg-hairline-light); }

/* Tool card (unified wrapper) */
.tool-card { background: #fff; border: 1px solid var(--mg-hairline-light); border-radius: 20px; padding: 32px; scroll-margin-top: 128px; }
.tool-card__header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--mg-hairline-light); }
.tool-card__accent { width: 6px; min-height: 48px; border-radius: 3px; flex: none; }
.tool-card__accent--blue { background: var(--mg-blue); }
.tool-card__accent--green { background: var(--mg-green); }
.tool-card__accent--red { background: var(--mg-red); }
.tool-card__accent--purple { background: #5d2a8a; }
.tool-card__accent--orange { background: #e89a1a; }
.tool-card__accent--glow { background: var(--mg-cosmic-glow); }
.tool-card__eyebrow { font-family: var(--mg-font-pixel); font-size: 9px; letter-spacing: 1.5px; margin-bottom: 6px; }
.tool-card__eyebrow--blue { color: var(--mg-blue); }
.tool-card__eyebrow--green { color: var(--mg-green); }
.tool-card__eyebrow--red { color: var(--mg-red); }
.tool-card__eyebrow--purple { color: #5d2a8a; }
.tool-card__eyebrow--orange { color: #e89a1a; }
.tool-card__eyebrow--glow { color: var(--mg-cosmic-glow); }
.tool-card__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 24px; color: var(--mg-ink); margin: 0; letter-spacing: -0.3px; }
.tool-card__desc { font-family: var(--mg-font-body); font-size: 14px; color: var(--mg-mute); margin: 4px 0 0; line-height: 1.5; }

/* Dice Roller */
.dice-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.dice-controls { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.dice-controls__label { font-family: var(--mg-font-body); font-size: 14px; color: var(--mg-mute); }
.dice-controls__range { width: 120px; }
.dice-controls__value { font-family: var(--mg-font-mono); font-size: 16px; color: var(--mg-ink); min-width: 20px; }
.dice-controls__value--wide { min-width: 28px; text-align: center; }
.dice-controls__modifier { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.dice-controls__btn { width: 32px; height: 32px; border-radius: 9999px; background: #f5f4ef; border: 1px solid var(--mg-hairline-light); color: var(--mg-ink); font-size: 18px; cursor: pointer; line-height: 1; transition: all 150ms; }
.dice-controls__btn:hover { border-color: var(--mg-ink); }
.dice-result { font-family: var(--mg-font-display); font-weight: 600; font-size: 80px; line-height: 1; letter-spacing: -2px; color: var(--mg-ink); margin-bottom: 8px; min-height: 88px; }
.dice-breakdown { font-family: var(--mg-font-mono); font-size: 13px; color: var(--mg-stone); margin-bottom: 20px; min-height: 20px; }
.name-gen__filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.name-gen__result { font-family: var(--mg-font-display); font-weight: 600; font-size: 56px; line-height: 1.0; letter-spacing: -1px; color: var(--mg-ink); margin-bottom: 6px; min-height: 64px; }
.name-gen__sub { font-family: var(--mg-font-mono); font-size: 13px; color: var(--mg-stone); margin-bottom: 24px; min-height: 20px; }
.name-gen__btns { display: flex; gap: 10px; flex-wrap: wrap; }
.score-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.score-board__btns { display: flex; gap: 10px; flex-wrap: wrap; }
.mod-tool-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; background: #fff; border: 1px solid var(--mg-hairline-light); border-radius: 14px; text-decoration: none; color: inherit; transition: border-color 150ms, transform 150ms; }
.mod-tool-card:hover { transform: translateY(-2px); }
.mod-tool-card__bar { width: 32px; height: 4px; border-radius: 2px; }
.mod-tool-card__title { font-family: var(--mg-font-display); font-weight: 600; font-size: 18px; color: var(--mg-ink); letter-spacing: -0.2px; }
.mod-tool-card__sub { font-family: var(--mg-font-body); font-size: 13px; color: var(--mg-mute); line-height: 1.45; }
.mod-tool-card__cta { font-family: var(--mg-font-body); font-weight: 600; font-size: 13px; margin-top: auto; }
.die-face__label { font-family: var(--mg-font-pixel); font-size: 10px; color: var(--mg-cosmic-glow); }
.die-face__label--sm { font-size: 8px; }
.die-face { width: 64px; height: 64px; border-radius: 10px; background: #f5f4ef; border: 1px solid var(--mg-hairline-light); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 120ms; user-select: none; }
.die-face:hover { border-color: var(--mg-cosmic-glow); transform: scale(1.06); }
.die-face.rolling { animation: dieRoll 0.4s cubic-bezier(.2,.8,.2,1); }
@keyframes dieRoll { 0% { transform: rotate(-20deg) scale(0.8); } 60% { transform: rotate(10deg) scale(1.1); } 100% { transform: rotate(0) scale(1); } }
input[type=range] { width: 100%; accent-color: #0c4f8d; }
/* Voting Booth */
.vote-setup__row { display: flex; gap: 10px; margin-bottom: 12px; }
.vote-setup__input { flex: 1; height: 40px; padding: 0 14px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); font-family: var(--mg-font-body); font-size: 14px; background: #f5f4ef; color: var(--mg-ink); outline: none; }
.vote-setup__input:focus { border-color: #3a9928; }
.vote-setup__options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.vote-setup__option-row { display: flex; gap: 10px; align-items: center; }
.vote-setup__remove { width: 28px; height: 28px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); background: transparent; color: var(--mg-mute); font-size: 16px; cursor: pointer; line-height: 1; }
.vote-setup__remove:hover { border-color: #d11a1a; color: #d11a1a; }
.vote-setup__btns { display: flex; gap: 10px; flex-wrap: wrap; }
.vote-active__question { font-family: var(--mg-font-display); font-weight: 600; font-size: 24px; color: var(--mg-ink); margin-bottom: 8px; }
.vote-active__info { font-family: var(--mg-font-mono); font-size: 13px; color: var(--mg-mute); margin-bottom: 20px; }
.vote-active__options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.vote-option { display: block; width: 100%; padding: 16px 20px; border-radius: 14px; border: 2px solid #3a9928; background: transparent; font-family: var(--mg-font-display); font-weight: 600; font-size: 18px; color: var(--mg-ink); cursor: pointer; text-align: left; transition: all 150ms; }
.vote-option:hover { background: #3a992810; transform: translateY(-1px); }
.vote-option:active { background: #3a9928; color: #fff; }
.vote-results__question { font-family: var(--mg-font-display); font-weight: 600; font-size: 24px; color: var(--mg-ink); margin-bottom: 20px; }
.vote-results__bar-wrap { margin-bottom: 12px; }
.vote-results__bar-label { display: flex; justify-content: space-between; font-family: var(--mg-font-body); font-size: 14px; font-weight: 600; color: var(--mg-ink); margin-bottom: 6px; }
.vote-results__bar-track { height: 28px; border-radius: 9999px; background: #f5f4ef; overflow: hidden; }
.vote-results__bar-fill { height: 100%; border-radius: 9999px; background: #3a9928; transition: width 400ms ease; }
.vote-results__total { font-family: var(--mg-font-mono); font-size: 13px; color: var(--mg-mute); margin-top: 16px; margin-bottom: 20px; }
.vote-results__btns { display: flex; gap: 10px; }
/* Seating Randomizer */
.seat-input__row { display: flex; gap: 10px; margin-bottom: 12px; }
.seat-input__field { flex: 1; height: 40px; padding: 0 14px; border-radius: 9999px; border: 1px solid rgba(255,255,255,0.2); font-family: var(--mg-font-body); font-size: 14px; background: rgba(255,255,255,0.06); color: #fff; outline: none; }
.seat-input__field:focus { border-color: #6fb5ff; }
.seat-input__list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.seat-input__tag { height: 32px; padding: 0 12px; border-radius: 9999px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); font-family: var(--mg-font-body); font-size: 13px; color: #fff; display: flex; align-items: center; gap: 8px; }
.seat-input__tag-remove { background: none; border: none; color: rgba(255,255,255,0.5); cursor: pointer; font-size: 14px; padding: 0; line-height: 1; }
.seat-input__tag-remove:hover { color: #fff; }
.seat-input__btns { display: flex; gap: 10px; flex-wrap: wrap; }
.seat-circle { position: relative; width: 280px; height: 280px; margin: 32px auto; }
.seat-circle__table { position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; margin: -50px 0 0 -50px; border-radius: 50%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; font-family: var(--mg-font-mono); font-size: 11px; color: rgba(255,255,255,0.4); }
.seat-circle__player { position: absolute; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: #161721; border: 2px solid rgba(255,255,255,0.25); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.seat-circle__player--first { border-color: #e8a91a; }
.seat-circle__player-name { font-family: var(--mg-font-body); font-weight: 600; font-size: 11px; color: #fff; line-height: 1.2; max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-circle__player-num { font-family: var(--mg-font-mono); font-size: 9px; color: rgba(255,255,255,0.5); }
.seat-circle__star { font-size: 10px; color: #e8a91a; line-height: 1; }
.seat-controls__btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }
/* Grid Generator */
.grid-control { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.grid-control__group { display: flex; align-items: center; gap: 8px; }
.grid-control__label { font-family: var(--mg-font-body); font-size: 13px; font-weight: 600; color: var(--mg-ink); }
.grid-control__input { width: 60px; height: 34px; border-radius: 8px; border: 1px solid var(--mg-hairline-light); font-family: var(--mg-font-mono); font-size: 13px; text-align: center; padding: 0 8px; }
.grid-control__range { width: 100px; accent-color: #0c4f8d; }
.grid-control__value { font-family: var(--mg-font-mono); font-size: 13px; color: var(--mg-ink); min-width: 32px; }
.grid-control__pill { height: 34px; padding: 0 14px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); background: transparent; font-family: var(--mg-font-body); font-weight: 600; font-size: 13px; color: var(--mg-ink); cursor: pointer; transition: all 150ms; }
.grid-control__pill--active { background: var(--mg-ink); color: #fff; border-color: var(--mg-ink); }
.grid-control__color { width: 28px; height: 28px; border-radius: 9999px; border: 2px solid transparent; cursor: pointer; transition: border-color 150ms; }
.grid-control__color--active { border-color: var(--mg-ink); }
.grid-control__btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.grid-preview { max-height: 400px; overflow: hidden; border: 1px solid var(--mg-hairline-light); border-radius: 12px; margin-top: 16px; display: flex; align-items: center; justify-content: center; background: #fff; }
.grid-preview svg { display: block; max-width: 100%; max-height: 400px; }
/* Turn Timer */
.timer-players { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.timer-players__input { font-family: var(--mg-font-body); font-size: 14px; height: 36px; padding: 0 14px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); background: #f5f4ef; color: var(--mg-ink); outline: none; width: 160px; }
.timer-players__input::placeholder { color: var(--mg-stone); }
.timer-players__tag { height: 32px; padding: 0 12px; border-radius: 9999px; background: #f5f4ef; border: 1px solid var(--mg-hairline-light); font-family: var(--mg-font-body); font-size: 13px; color: var(--mg-ink); display: flex; align-items: center; gap: 8px; }
.timer-players__tag-remove { background: none; border: none; color: var(--mg-mute); cursor: pointer; font-size: 14px; padding: 0; line-height: 1; }
.timer-players__tag-remove:hover { color: #d11a1a; }
.timer-presets { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.timer-preset-btn { font-family: var(--mg-font-body); font-weight: 600; font-size: 13px; height: 34px; padding: 0 14px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); background: transparent; color: var(--mg-ink); cursor: pointer; transition: all 150ms; }
.timer-preset-btn--active { background: #d11a1a; border-color: #d11a1a; color: #fff; }
.timer-display { font-family: var(--mg-font-mono); font-size: 64px; font-weight: 600; color: var(--mg-ink); text-align: center; margin-bottom: 8px; min-height: 80px; line-height: 1.2; }
.timer-display--expired { animation: timerPulse 0.6s ease-in-out 3; }
@keyframes timerPulse { 0%, 100% { color: var(--mg-ink); } 50% { color: #d11a1a; } }
.timer-current { font-family: var(--mg-font-body); font-size: 16px; color: var(--mg-mute); text-align: center; margin-bottom: 20px; min-height: 24px; }
.timer-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.timer-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.timer-stats__entry { background: #f5f4ef; border: 1px solid var(--mg-hairline-light); border-radius: 12px; padding: 12px; text-align: center; }
.timer-stats__name { font-family: var(--mg-font-body); font-size: 12px; color: var(--mg-mute); margin-bottom: 4px; }
.timer-stats__time { font-family: var(--mg-font-mono); font-size: 18px; color: var(--mg-ink); font-weight: 600; }
/* Initiative Tracker */
.init-add { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.init-add__input { font-family: var(--mg-font-body); font-size: 14px; height: 36px; padding: 0 14px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); background: #fff; color: var(--mg-ink); outline: none; }
.init-add__input--name { width: 160px; }
.init-add__input--number { width: 80px; text-align: center; }
.init-round { font-family: var(--mg-font-display); font-weight: 600; font-size: 24px; color: var(--mg-ink); margin-bottom: 16px; }
.init-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.init-entry { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: #f5f4ef; border: 2px solid transparent; transition: border-color 150ms, background 150ms; }
.init-entry--active { border-color: #0c4f8d; background: #e8f0fa; }
.init-entry__rank { font-family: var(--mg-font-mono); font-size: 24px; font-weight: 600; color: #0c4f8d; min-width: 40px; text-align: center; }
.init-entry__name { font-family: var(--mg-font-body); font-size: 15px; font-weight: 600; color: var(--mg-ink); flex: 1; }
.init-entry__remove { width: 28px; height: 28px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); background: #fff; color: var(--mg-mute); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 150ms; }
.init-entry__remove:hover { border-color: #d11a1a; color: #d11a1a; }
.init-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

/* Map Grid Generator (new card version) */
.map-grid__controls { margin-bottom: 20px; display: flex; flex-direction: column; gap: 12px; }
.map-grid__types { display: flex; gap: 8px; flex-wrap: wrap; }
.map-grid__size-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.map-grid__label { font-family: var(--mg-font-body); font-size: 13px; font-weight: 600; color: var(--mg-ink); }
.map-grid__input { width: 60px; height: 34px; border-radius: 8px; border: 1px solid var(--mg-hairline-light); font-family: var(--mg-font-mono); font-size: 13px; text-align: center; padding: 0 8px; }
.map-grid__canvas { border: 1px solid var(--mg-hairline-light); border-radius: 12px; background: #fff; padding: 16px; overflow: hidden; margin-bottom: 16px; }
.map-grid__svg { display: block; width: 100%; max-height: 300px; }
.map-grid__btns { display: flex; gap: 10px; }

/* Rules Lookup */
.rules-lookup__search { width: 100%; height: 44px; border-radius: 9999px; border: 2px solid var(--mg-hairline-light); font-family: var(--mg-font-body); font-size: 15px; padding: 0 20px; box-sizing: border-box; outline: none; margin-bottom: 12px; transition: border-color 150ms; }
.rules-lookup__search:focus { border-color: #d11a1a; }
.rules-lookup__filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.rules-lookup__filter { font-family: var(--mg-font-body); font-weight: 600; font-size: 12px; height: 28px; padding: 0 10px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); background: transparent; color: var(--mg-ink); cursor: pointer; transition: all 150ms; }
.rules-lookup__filter:hover { border-color: var(--mg-ink); }
.rules-lookup__filter--active { background: var(--mg-ink); color: #fff; border-color: var(--mg-ink); }
.rules-lookup__results { display: flex; flex-direction: column; gap: 0; }
.rules-lookup__count { font-family: var(--mg-font-mono); font-size: 11px; color: var(--mg-stone); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.rules-lookup__status { font-family: var(--mg-font-body); font-size: 14px; color: var(--mg-mute); text-align: center; padding: 32px 0; }
.rules-lookup__empty { text-align: center; padding: 40px 0 24px; }
.rules-lookup__empty-count { font-family: var(--mg-font-mono); font-size: 13px; color: var(--mg-stone); margin-bottom: 8px; }
.rules-lookup__empty-hint { font-family: var(--mg-font-body); font-size: 14px; color: var(--mg-mute); }
.rules-lookup__hit { display: block; text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--mg-hairline-light); transition: background 100ms; }
.rules-lookup__hit:first-of-type { border-top: 1px solid var(--mg-hairline-light); }
.rules-lookup__hit:hover { background: rgba(209,26,26,0.03); }
.rules-lookup__hit-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.rules-lookup__hit-game { font-family: var(--mg-font-mono); font-size: 11px; color: var(--mg-stone); text-transform: uppercase; letter-spacing: 0.3px; }
.rules-lookup__hit-section { font-family: var(--mg-font-body); font-size: 11px; color: var(--mg-mute); }
.rules-lookup__hit-section::before { content: '›'; margin-right: 6px; }
.rules-lookup__hit-heading { font-family: var(--mg-font-display); font-weight: 600; font-size: 15px; color: var(--mg-ink); margin-bottom: 3px; }
.rules-lookup__hit-excerpt { font-family: var(--mg-font-body); font-size: 13px; color: var(--mg-mute); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rules-lookup__hit mark { background: rgba(209,26,26,0.12); color: var(--mg-ink); border-radius: 2px; padding: 0 1px; }

/* Voting Booth (new card version) */
.vote-input { width: 100%; height: 40px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); font-family: var(--mg-font-body); font-size: 14px; padding: 0 16px; outline: none; box-sizing: border-box; }
.vote-input:focus { border-color: #3a9928; }
.vote-input--question { font-weight: 600; margin-bottom: 16px; }
.vote-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.vote-option-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: #f5f4ef; }
.vote-option-row__text { font-family: var(--mg-font-body); font-size: 14px; color: var(--mg-ink); flex: 1; }
.vote-option-row__remove { width: 24px; height: 24px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); background: #fff; color: var(--mg-mute); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.vote-option-row__remove:hover { border-color: #d11a1a; color: #d11a1a; }
.vote-add { display: flex; gap: 10px; margin-bottom: 16px; }
.vote-add .vote-input { flex: 1; margin-bottom: 0; }
.vote-question { font-family: var(--mg-font-display); font-weight: 600; font-size: 22px; color: var(--mg-ink); margin: 0 0 16px; }
.vote-ballot { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.vote-ballot__option { width: 100%; padding: 14px 20px; border-radius: 14px; border: 2px solid #3a9928; background: transparent; font-family: var(--mg-font-display); font-weight: 600; font-size: 16px; color: var(--mg-ink); cursor: pointer; text-align: left; transition: all 150ms; }
.vote-ballot__option:hover { background: rgba(58,153,40,0.06); transform: translateY(-1px); }
.vote-hint { font-family: var(--mg-font-body); font-size: 13px; color: var(--mg-mute); }
.vote-results { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.vote-result-row { display: flex; flex-direction: column; gap: 4px; }
.vote-result-row__label { font-family: var(--mg-font-body); font-weight: 600; font-size: 14px; color: var(--mg-ink); }
.vote-result-row__count { font-family: var(--mg-font-mono); font-size: 12px; color: var(--mg-stone); }
.vote-result-row__bar { height: 24px; border-radius: 9999px; background: #f5f4ef; overflow: hidden; }
.vote-result-row__fill { height: 100%; border-radius: 9999px; background: #3a9928; min-width: 4px; transition: width 300ms ease; }
.vote-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

/* Seating Randomizer (new card version) */
.seating-add { display: flex; gap: 10px; margin-bottom: 16px; }
.seating-add__input { flex: 1; height: 36px; padding: 0 14px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); font-family: var(--mg-font-body); font-size: 14px; background: #f5f4ef; color: var(--mg-ink); outline: none; }
.seating-add__input::placeholder { color: var(--mg-stone); }
.seating-add__input:focus { border-color: var(--mg-cosmic-glow); }
.seating-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; min-height: 32px; }
.seating-tag { height: 32px; padding: 0 12px; border-radius: 9999px; background: #f5f4ef; border: 1px solid var(--mg-hairline-light); font-family: var(--mg-font-body); font-size: 13px; color: var(--mg-ink); display: flex; align-items: center; gap: 8px; }
.seating-tag__remove { background: none; border: none; color: var(--mg-mute); cursor: pointer; font-size: 14px; padding: 0; line-height: 1; }
.seating-tag__remove:hover { color: #d11a1a; }
.seating-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.seating-result { min-height: 40px; }
.seating-table { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.seating-seat { background: #f5f4ef; border: 1px solid var(--mg-hairline-light); border-radius: 12px; padding: 14px; text-align: center; }
.seating-seat__num { font-family: var(--mg-font-mono); font-size: 11px; color: var(--mg-stone); margin-bottom: 4px; }
.seating-seat__name { font-family: var(--mg-font-body); font-weight: 600; font-size: 14px; color: var(--mg-ink); }

/* Resource Dashboard */
.res-presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.res-player { background: #f5f4ef; border-radius: 14px; padding: 16px; }
.res-player__name { font-family: var(--mg-font-display); font-weight: 600; font-size: 16px; color: var(--mg-ink); margin-bottom: 12px; border-bottom: 1px dashed #c3c5cc; padding-bottom: 6px; outline: none; }
.res-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.res-row__label { font-family: var(--mg-font-body); font-size: 13px; color: #4f5764; flex: 1; }
.res-row__value { font-family: var(--mg-font-mono); font-weight: 600; font-size: 18px; color: var(--mg-ink); min-width: 36px; text-align: center; }
.res-row__btn { width: 30px; height: 30px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); background: #fff; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--mg-ink); transition: all 120ms; }
.res-row__btn:hover { border-color: var(--mg-ink); }
.res-row__btn--plus { background: var(--mg-green); border-color: var(--mg-green); color: #fff; }
.res-row__btn--plus:hover { opacity: 0.85; border-color: var(--mg-green); }
.res-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.res-add { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.res-add__input { height: 36px; padding: 0 14px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); font-family: var(--mg-font-body); font-size: 14px; background: #f5f4ef; color: var(--mg-ink); outline: none; width: 160px; }
.res-chips { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; margin-top: 8px; }
.res-chip { font-family: var(--mg-font-mono); font-size: 12px; padding: 4px 10px; background: #f5f4ef; border: 1px solid var(--mg-hairline-light); border-radius: 9999px; color: var(--mg-ink); display: inline-flex; align-items: center; gap: 6px; }
.res-chip__remove { background: none; border: none; color: var(--mg-mute); cursor: pointer; font-size: 14px; padding: 0; line-height: 1; }
.res-chip__remove:hover { color: #d11a1a; }
.res-empty { font-family: var(--mg-font-body); font-size: 14px; color: var(--mg-mute); text-align: center; padding: 24px 0; }

/* Combat Odds Calculator */
.odds-presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.odds-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: start; margin-bottom: 20px; }
.odds-vs { font-family: var(--mg-font-display); font-weight: 700; font-size: 20px; color: #636b78; align-self: center; text-align: center; padding-top: 28px; }
.odds-side { display: flex; flex-direction: column; gap: 10px; }
.odds-side__label { font-family: var(--mg-font-display); font-weight: 600; font-size: 16px; color: var(--mg-ink); margin-bottom: 4px; }
.odds-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.odds-row__key { font-family: var(--mg-font-body); font-size: 13px; color: #4f5764; }
.odds-input { width: 56px; padding: 6px 10px; border: 1px solid var(--mg-hairline-light); border-radius: 8px; font-family: var(--mg-font-mono); font-size: 14px; text-align: center; background: #f5f4ef; }
.odds-input:focus { outline: none; border-color: var(--mg-red); }
.odds-result { margin-top: 16px; margin-bottom: 20px; }
.odds-bars { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.odds-bar-row { display: flex; align-items: center; gap: 10px; }
.odds-bar-row__label { font-family: var(--mg-font-body); font-size: 13px; color: var(--mg-ink); min-width: 100px; }
.odds-bar-row__pct { font-family: var(--mg-font-mono); font-weight: 600; font-size: 14px; color: var(--mg-ink); min-width: 48px; text-align: right; }
.odds-bar-row__track { flex: 1; height: 24px; border-radius: 9999px; background: #f5f4ef; overflow: hidden; }
.odds-bar-row__fill { height: 100%; border-radius: 9999px; transition: width 300ms ease; min-width: 2px; }
.odds-meta { font-family: var(--mg-font-mono); font-size: 12px; color: var(--mg-stone); }

/* Bag Tracker */
.bag-presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.bag-summary { margin-bottom: 16px; }
.bag-summary__count { font-family: var(--mg-font-display); font-weight: 700; font-size: 36px; color: var(--mg-ink); }
.bag-summary__label { font-family: var(--mg-font-body); font-size: 15px; color: var(--mg-mute); }
.bag-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.bag-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #f5f4ef; border-radius: 10px; }
.bag-row__name { font-family: var(--mg-font-body); font-weight: 600; font-size: 14px; color: var(--mg-ink); flex: 1; }
.bag-row__odds { font-family: var(--mg-font-mono); font-weight: 600; font-size: 14px; color: var(--mg-blue); min-width: 36px; }
.bag-row__count { font-family: var(--mg-font-mono); font-size: 12px; color: var(--mg-stone); min-width: 44px; }
.bag-row__btn { font-family: var(--mg-font-body); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); background: #fff; color: var(--mg-ink); cursor: pointer; transition: all 120ms; }
.bag-row__btn:hover { border-color: var(--mg-ink); }
.bag-row__btn--undo { color: var(--mg-mute); }
.bag-btns { display: flex; gap: 10px; }
.bag-add { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; margin-top: 16px; }
.bag-add__input { height: 36px; padding: 0 14px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); font-family: var(--mg-font-body); font-size: 14px; background: #f5f4ef; color: var(--mg-ink); outline: none; }
.bag-add__input--num { width: 70px; text-align: center; }
.bag-empty { font-family: var(--mg-font-body); font-size: 14px; color: var(--mg-mute); text-align: center; padding: 24px 0; }

/* Role Distributor */
.role-presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.role-info { margin-bottom: 16px; }
.role-info__count { font-family: var(--mg-font-display); font-weight: 600; font-size: 18px; color: var(--mg-ink); margin-bottom: 8px; }
.role-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.role-chip { font-family: var(--mg-font-mono); font-size: 12px; padding: 4px 10px; background: #f5f4ef; border: 1px solid var(--mg-hairline-light); border-radius: 9999px; color: var(--mg-ink); }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 12px; }
.role-card { background: #14161c; border-radius: 14px; padding: 18px 14px; text-align: center; cursor: pointer; transition: all 150ms; user-select: none; }
.role-card:hover { transform: translateY(-2px); }
.role-card--revealed { background: #f5f4ef; border: 2px solid var(--mg-red); }
.role-card__player { font-family: var(--mg-font-mono); font-size: 11px; color: rgba(255,255,255,0.5); margin-bottom: 6px; }
.role-card--revealed .role-card__player { color: var(--mg-mute); }
.role-card__role { font-family: var(--mg-font-display); font-weight: 700; font-size: 16px; color: #fff; }
.role-card--revealed .role-card__role { color: var(--mg-red); }
.role-hint { font-family: var(--mg-font-body); font-size: 13px; color: var(--mg-mute); margin-bottom: 16px; }
.role-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.role-add { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.role-add__input { height: 36px; padding: 0 14px; border-radius: 9999px; border: 1px solid var(--mg-hairline-light); font-family: var(--mg-font-body); font-size: 14px; background: #f5f4ef; color: var(--mg-ink); outline: none; width: 160px; }
.role-chip__remove { background: none; border: none; color: var(--mg-mute); cursor: pointer; font-size: 14px; padding: 0; line-height: 1; margin-left: 4px; }
.role-chip__remove:hover { color: #d11a1a; }

@media (max-width: 768px) {
  .tools-hero__inner { flex-direction: column; text-align: center; }
  .tools-hero__dice { width: 120px; height: 120px; margin: 0 auto; order: -1; }
  .tools-hero__dice .dice3d { width: 80px; height: 80px; margin: 20px auto; }
  .tools-hero__dice .dice3d__face { width: 80px; height: 80px; border-radius: 10px; padding: 14px; }
  .tools-hero__dice .dice3d__face--front { transform: translateZ(40px); }
  .tools-hero__dice .dice3d__face--back { transform: rotateY(180deg) translateZ(40px); }
  .tools-hero__dice .dice3d__face--top { transform: rotateX(90deg) translateZ(40px); }
  .tools-hero__dice .dice3d__face--bottom { transform: rotateX(-90deg) translateZ(40px); }
  .tools-hero__dice .dice3d__face--right { transform: rotateY(90deg) translateZ(40px); }
  .tools-hero__dice .dice3d__face--left { transform: rotateY(-90deg) translateZ(40px); }
  .tools-hero__dice .pip { width: 10px; height: 10px; }
  .tools-hero { padding: 48px 20px 64px; }
  .tools-body { padding: 32px 20px 64px; }
  .tools-jumpnav { padding: 10px 16px; }
  .tools-jumpnav__link { font-size: 12px; height: 28px; padding: 0 10px; }
  .tools-filter { padding: 12px 20px; justify-content: center; }
  .tool-card { padding: 24px 20px; text-align: center; }
  .tool-card__header { flex-direction: column; align-items: center; text-align: center; }
  .tool-card__accent { display: none; }
  .tool-card__tags { justify-content: center; }
  .mod-tool-card { text-align: center; align-items: center; }
  .mod-tool-card__cta { align-self: center; }
  .role-chips { justify-content: center; }
  .role-btns { justify-content: center; }
  .role-add { justify-content: center; }

  /* Centre all button groups */
  .name-gen__btns { justify-content: center; }
  .score-board__btns { justify-content: center; }
  .timer-buttons { justify-content: center; }
  .init-buttons { justify-content: center; }
  .vote-buttons { justify-content: center; }
  .vote-results__btns { justify-content: center; }
  .seating-buttons { justify-content: center; }
  .res-btns { justify-content: center; }
  .bag-btns { justify-content: center; }
  .grid-control__btns { justify-content: center; }
  .map-grid__btns { justify-content: center; }
  .odds-presets { justify-content: center; }
  .bag-presets { justify-content: center; }
  .role-presets { justify-content: center; }
  .res-presets { justify-content: center; }

  /* Full-width inputs */
  .timer-players__input { width: 100%; }
  .init-add { flex-direction: column; align-items: stretch; }
  .init-add__input--name { width: 100%; }
  .init-add__input--number { width: 100%; }
  .res-add { flex-direction: column; align-items: stretch; }
  .res-add__input { width: 100%; }
  .bag-add { flex-direction: column; align-items: stretch; }
  .bag-add__input { width: 100%; }
  .seating-add { flex-direction: column; align-items: stretch; }
  .seating-add__input { width: 100%; }
  .dice-result { font-size: 56px; }
  .name-gen__result { font-size: 36px; }
  .timer-display { font-size: 48px; }
  .odds-grid { grid-template-columns: 1fr; gap: 20px; }
  .odds-vs { padding-top: 0; }
  .res-grid { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
}

/* tools-oracles.css */
/* Oracle Tools Page — matches dice/tools pattern */
.oracle-body { padding: 48px 32px 96px; }
.oracle-body__inner { max-width: 900px; margin: 0 auto; }

.oracle-tabs { display: none; }
.oracle-tabs::-webkit-scrollbar { display: none; }
.oracle-tabs__btn {
  font-family: var(--mg-font-body);
  font-weight: 600;
  font-size: 12px;
  padding: 7px 13px;
  border-radius: 9999px;
  border: 1px solid #e6e3d8;
  background: #fff;
  color: #14161c;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.oracle-tabs__btn:hover { border-color: #14161c; background: #fafaf7; }
.oracle-tabs__btn--active { background: #14161c; color: #fff; border-color: #14161c; }
.oracle-tabs__btn--active:hover { background: #2a2d34; color: #fff; }

.oracle-panel { padding: 0; min-height: 400px; }

/* Section headers */
.oracle-section-title {
  font-family: var(--mg-font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: #14161c;
  margin: 0 0 6px;
}
.oracle-section-sub {
  font-family: var(--mg-font-body);
  font-size: 0.875rem;
  color: #6b6e76;
  margin: 0 0 24px;
}

/* Controls row */
.oracle-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}
.oracle-select {
  background: #fff;
  border: 1px solid #e6e3d8;
  border-radius: 9999px;
  padding: 10px 16px;
  color: #14161c;
  font-family: var(--mg-font-body);
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
  min-width: 160px;
}
.oracle-select:focus { border-color: #14161c; }

/* Region pills */
.oracle-region-pills { display: flex; gap: 4px; }
.oracle-region-pill {
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid #e6e3d8;
  background: #fff;
  color: #6b6e76;
  font-family: var(--mg-font-body);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.oracle-region-pill:hover { border-color: #14161c; color: #14161c; }
.oracle-region-pill--active {
  background: #14161c;
  color: #fff;
  border-color: #14161c;
}

/* Action buttons */
.oracle-forge-btn {
  padding: 10px 24px;
  border-radius: 9999px;
  border: none;
  background: #14161c;
  color: #fff;
  font-family: var(--mg-font-display);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s;
}
.oracle-forge-btn:hover { background: #2a2d34; }

/* Result cards grid — fills full width regardless of count */
.oracle-results {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.oracle-result-card {
  flex: 1 1 0;
  min-width: 120px;
}
.oracle-result-card {
  background: #f5f4ef;
  border: 1px solid #e6e3d8;
  border-radius: 12px;
  padding: 16px;
  position: relative;
}
.oracle-result-card__label {
  font-family: var(--mg-font-mono);
  font-size: 0.65rem;
  color: #6b6e76;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.oracle-result-card__value {
  font-family: var(--mg-font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: #14161c;
  line-height: 1.3;
}
.oracle-result-card__roll {
  font-family: var(--mg-font-mono);
  font-size: 0.7rem;
  color: #a0a3aa;
  margin-top: 8px;
}
.oracle-result-card__reroll {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #e6e3d8;
  background: #fff;
  color: #6b6e76;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.oracle-result-card:hover .oracle-result-card__reroll { opacity: 1; }
.oracle-result-card__reroll:hover { background: #f5f4ef; color: #14161c; }

/* Narrative sentence */
.oracle-narrative {
  background: #f5f4ef;
  border: 1px solid #e6e3d8;
  border-left: 3px solid #14161c;
  border-radius: 8px;
  padding: 20px 24px;
  margin-top: 24px;
  font-family: var(--mg-font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: #14161c;
  line-height: 1.6;
}

/* Ask the Oracle */
.oracle-likelihood-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.oracle-likelihood-pill {
  padding: 8px 16px;
  border-radius: 9999px;
  border: 1px solid #e6e3d8;
  background: #fff;
  color: #6b6e76;
  font-family: var(--mg-font-body);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}
.oracle-likelihood-pill:hover { border-color: #14161c; color: #14161c; }
.oracle-likelihood-pill--active {
  background: #14161c;
  color: #fff;
  border-color: #14161c;
}

.oracle-question-input {
  width: 100%;
  background: #fff;
  border: 1px solid #e6e3d8;
  border-radius: 8px;
  padding: 12px 16px;
  color: #14161c;
  font-family: var(--mg-font-body);
  font-size: 0.9rem;
  outline: none;
  margin-bottom: 16px;
  box-sizing: border-box;
}
.oracle-question-input::placeholder { color: #a0a3aa; }
.oracle-question-input:focus { border-color: #14161c; }

.oracle-answer {
  text-align: center;
  padding: 40px 0 20px;
}
.oracle-answer__verdict {
  font-family: var(--mg-font-display);
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -1px;
}
.oracle-answer__verdict--yes,
.oracle-answer__verdict--strong_yes { color: #3a9928; }
.oracle-answer__verdict--no,
.oracle-answer__verdict--strong_no { color: #d11a1a; }
.oracle-answer__verdict--strong_yes { text-shadow: 0 0 20px rgba(58, 153, 40, 0.25); }
.oracle-answer__verdict--strong_no { text-shadow: 0 0 20px rgba(209, 26, 26, 0.25); }

.oracle-answer__roll {
  font-family: var(--mg-font-mono);
  font-size: 0.9rem;
  color: #6b6e76;
  margin-top: 12px;
}
.oracle-answer__twist {
  font-family: var(--mg-font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: #d4a017;
  margin-top: 12px;
  animation: twist-pulse 1.5s ease-in-out;
}
@keyframes twist-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.oracle-answer__question {
  font-family: var(--mg-font-body);
  font-size: 0.85rem;
  color: #6b6e76;
  margin-top: 16px;
  font-style: italic;
}

/* Thread Weaver */
.oracle-thread-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.oracle-thread-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f5f4ef;
  border: 1px solid #e6e3d8;
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.oracle-thread-item:hover,
.oracle-thread-item--active { border-color: #14161c; }
.oracle-thread-item__name {
  font-family: var(--mg-font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: #14161c;
  flex: 1;
}
.oracle-thread-item__count {
  font-family: var(--mg-font-mono);
  font-size: 0.7rem;
  color: #6b6e76;
}
.oracle-thread-item__remove {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #e6e3d8;
  background: none;
  color: #6b6e76;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.oracle-thread-item__remove:hover { color: #d11a1a; border-color: #d11a1a; }

.oracle-thread-add {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.oracle-thread-add__input {
  flex: 1;
  background: #fff;
  border: 1px solid #e6e3d8;
  border-radius: 8px;
  padding: 10px 14px;
  color: #14161c;
  font-family: var(--mg-font-body);
  font-size: 0.85rem;
  outline: none;
}
.oracle-thread-add__input:focus { border-color: #14161c; }
.oracle-thread-add__input::placeholder { color: #a0a3aa; }

.oracle-thread-rolls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.oracle-thread-roll {
  border-left: 2px solid #e6e3d8;
  padding: 8px 0 8px 16px;
}
.oracle-thread-roll__result {
  font-family: var(--mg-font-display);
  font-size: 0.9rem;
  color: #14161c;
}
.oracle-thread-roll__meta {
  font-family: var(--mg-font-mono);
  font-size: 0.65rem;
  color: #a0a3aa;
  margin-top: 4px;
}

/* Empty state */
.oracle-empty {
  text-align: center;
  padding: 60px 24px;
  color: #6b6e76;
  font-family: var(--mg-font-body);
  font-size: 0.9rem;
}

/* Encounter Builder */
.oracle-encounter-controls { margin-bottom: 24px; }
.oracle-encounter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.oracle-encounter-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 100px; }
.oracle-encounter-field__label {
  font-family: var(--mg-font-mono);
  font-size: 0.65rem;
  color: #6b6e76;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.oracle-encounter-field__input {
  background: #fff;
  border: 1px solid #e6e3d8;
  border-radius: 8px;
  padding: 10px 12px;
  color: #14161c;
  font-family: var(--mg-font-body);
  font-size: 0.875rem;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.oracle-encounter-field__input:focus { border-color: #14161c; }

.oracle-encounter-results { margin-top: 24px; }

.oracle-encounter-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  margin-bottom: 16px;
}
.oracle-encounter-badge {
  font-family: var(--mg-font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  color: #fff;
}
.oracle-encounter-badge--easy { background: #3a9928; }
.oracle-encounter-badge--medium { background: #d4a017; }
.oracle-encounter-badge--hard { background: #d46017; }
.oracle-encounter-badge--deadly { background: #d11a1a; }
.oracle-encounter-terrain {
  font-family: var(--mg-font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: #14161c;
}
.oracle-encounter-xp {
  font-family: var(--mg-font-mono);
  font-size: 0.75rem;
  color: #6b6e76;
}

.oracle-encounter-loot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e6e3d8;
}
.oracle-encounter-loot__title {
  font-family: var(--mg-font-mono);
  font-size: 0.7rem;
  color: #6b6e76;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.oracle-encounter-loot__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.oracle-encounter-loot__name {
  font-family: var(--mg-font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: #14161c;
}
.oracle-encounter-loot__rarity {
  font-family: var(--mg-font-mono);
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid #e6e3d8;
  color: #6b6e76;
}
.oracle-encounter-loot__rarity--common { color: #6b6e76; border-color: #e6e3d8; }
.oracle-encounter-loot__rarity--uncommon { color: #3a9928; border-color: #3a9928; }
.oracle-encounter-loot__rarity--rare { color: #0c4f8d; border-color: #0c4f8d; }
.oracle-encounter-loot__rarity--very-rare { color: #7b5ea7; border-color: #7b5ea7; }
.oracle-encounter-loot__rarity--legendary { color: #d4a017; border-color: #d4a017; }
.oracle-encounter-loot__rarity--artifact { color: #d11a1a; border-color: #d11a1a; }

/* RPG Library */
.oracle-library-results { margin-top: 24px; }
.oracle-library-results .oracle-results { flex-wrap: wrap; }
.oracle-library-results .oracle-result-card { flex: 1 1 calc(33.33% - 12px); min-width: 180px; }

/* Mobile */
@media (max-width: 768px) {
  .oracle-body { padding: 36px 20px 64px; }
  .oracle-panel { padding: 24px; }
  .oracle-results { flex-wrap: wrap; }
  .oracle-results .oracle-result-card { flex: 1 1 calc(50% - 6px); min-width: 0; }
  .oracle-controls { flex-direction: column; align-items: stretch; }
  .oracle-select { min-width: 0; }
  .oracle-answer__verdict { font-size: 2.5rem; }
  .oracle-encounter-row { flex-direction: column; }
  .oracle-encounter-field { min-width: 0; }
}
