/* Fonts: self-hosted Google Fonts files under the SIL Open Font License 1.1, see
   ../assets/slimeguides/fonts/sg-inter-license.txt and
   ../assets/slimeguides/fonts/sg-lilita-one-license.txt. latin-ext is only downloaded when a
   page uses one of its characters (QC-24). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/slimeguides/fonts/sg-inter-latin-ext-font.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/slimeguides/fonts/sg-inter-latin-font.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Lilita One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/slimeguides/fonts/sg-lilita-one-latin-ext-font.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: "Lilita One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/slimeguides/fonts/sg-lilita-one-latin-font.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Typography: Inter for text, Lilita One as the brand display face. Lilita One has a
     single weight, so display text disables synthetic bold. */
  --sg-font-body: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sg-font-display: "Lilita One", var(--sg-font-body);

  /* Brand palette */
  --sg-bg: #05070b;
  --sg-surface: #10141c;

  --sg-green: #a8ff00;
  --sg-purple: #9d4edd;
  --sg-blue: #69c8ff;
  --sg-red: #ff6666;

  --sg-text: #f5f7fa;
  --sg-muted: #a7adba;
  --sg-dark-text: #061006;

  /* RGB helpers for transparent effects */
  --sg-rgb-bg: 5, 7, 11;
  --sg-rgb-green: 168, 255, 0;
  --sg-rgb-purple: 157, 78, 221;

  /* Shared effects */
  --sg-border-green-strong: rgba(var(--sg-rgb-green), 0.45);

  --sg-page-padding: 6vw;
  --sg-radius-lg: 30px;
  --sg-radius-md: 24px;
}

/* =========================================================
   Base
   ========================================================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--sg-text);
  font-family: var(--sg-font-body);
  background:
    radial-gradient(circle at 15% 25%, rgba(var(--sg-rgb-green), 0.1), transparent 34%),
    radial-gradient(circle at 82% 55%, rgba(var(--sg-rgb-purple), 0.1), transparent 40%),
    radial-gradient(circle at 20% 82%, rgba(var(--sg-rgb-green), 0.055), transparent 32%),
    linear-gradient(180deg, #05070b 0%, #070b10 45%, #05070b 100%);
}

h1,
h2,
h3,
.sg-button {
  font-family: var(--sg-font-display);
  font-synthesis: none;
  letter-spacing: 0.01em;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.sg-skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sg-skip-link:focus {
  width: auto;
  height: auto;
  max-width: calc(100vw - 1.5rem);
  padding: 0.45rem 0.65rem;
  overflow: visible;
  clip-path: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 0.375rem;
  outline: 3px solid var(--sg-green);
  outline-offset: 2px;
  background: var(--sg-surface);
  color: var(--sg-text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
}

/* =========================================================
   Header
   ========================================================= */
.sg-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 10px var(--sg-page-padding);
  background: rgba(var(--sg-rgb-bg), 0.78);
  border-bottom: 1px solid rgba(var(--sg-rgb-green), 0.18);
  backdrop-filter: blur(16px);
}

.sg-menu-toggle {
  display: none;
}

.sg-header__nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--sg-muted);
  font-size: 0.95rem;
}

.sg-header__nav a {
  display: inline-flex;
  min-block-size: 44px;
  align-items: center;
}

.sg-header__nav a[aria-current="page"],
.sg-mobile-menu nav a[aria-current="page"],
.sg-mobile-menu__legal a[aria-current="page"],
.sg-footer__legal a[aria-current="page"] {
  color: var(--sg-text);
  text-decoration-line: underline;
  text-decoration-color: var(--sg-green);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.sg-mobile-menu nav a[aria-current="page"] {
  color: var(--sg-green);
}

.sg-header__nav a[aria-current="page"]:hover,
.sg-mobile-menu__legal a[aria-current="page"]:hover,
.sg-footer__legal a[aria-current="page"]:hover {
  color: var(--sg-green);
}

.sg-mobile-menu nav a[aria-current="page"]:hover {
  color: var(--sg-text);
}

.sg-header__nav a:hover {
  color: var(--sg-green);
}

.sg-header__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sg-header__brand img {
  display: block;
  width: clamp(110px, 9vw, 150px);
  height: auto;
  filter: drop-shadow(0 0 8px rgba(var(--sg-rgb-green), 0.2));
}

.sg-header__actions {
  justify-self: end;
  display: flex;
  gap: 0.35rem;
  padding: 0 0.25rem;
  border: 1px solid rgba(var(--sg-rgb-green), 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.sg-visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sg-lang {
  display: inline-flex;
  min-inline-size: 44px;
  min-block-size: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  color: var(--sg-muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.sg-lang.is-active {
  background: var(--sg-green);
  color: var(--sg-dark-text);
}

/* =========================================================
   Mobile offcanvas menu
   ========================================================= */
.sg-menu-backdrop,
.sg-mobile-menu {
  display: none;
}

/* =========================================================
   Hero
   ========================================================= */
.sg-hero {
  min-height: 36rem;
  display: flex;
  align-items: center;
  padding: 3rem var(--sg-page-padding);
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 0.92) 25%,
      rgba(0, 0, 0, 0.6) 42%,
      rgba(0, 0, 0, 0.18) 60%,
      rgba(0, 0, 0, 0.02) 100%
    ),
    url("../assets/slimeguides/banners/sg-home-hero.webp");
  background-color: #000;
  background-size: cover, contain;
  background-position:
    center,
    right center;
  background-repeat: no-repeat;
}

.sg-hero__content {
  max-width: 520px;
}

.sg-eyebrow,
.sg-section-label {
  margin: 0 0 1rem;
  color: var(--sg-green);
  font-size: 0.85rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.sg-hero h1 {
  margin: 0 0 1.5rem;
  color: var(--sg-text);
  font-size: clamp(2.8rem, 4.4vw, 4.75rem);
  line-height: 0.95;
}

.sg-hero p:not(.sg-eyebrow) {
  max-width: 560px;
  color: var(--sg-muted);
  font-size: 1.15rem;
  line-height: 1.7;
}

.sg-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* =========================================================
   Buttons
   ========================================================= */
.sg-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.sg-button--primary {
  border-color: rgba(var(--sg-rgb-green), 0.75);
  background: var(--sg-green);
  color: var(--sg-dark-text);
  box-shadow: 0 0 28px rgba(var(--sg-rgb-green), 0.35);
}

.sg-button--secondary {
  border-color: rgba(var(--sg-rgb-green), 0.45);
  background: rgba(var(--sg-rgb-green), 0.035);
  color: var(--sg-green);
}

.sg-button:hover,
.sg-button:focus-visible {
  transform: translateY(-2px);
}

.sg-button--primary:hover,
.sg-button--primary:focus-visible {
  box-shadow:
    0 0 0 1px rgba(var(--sg-rgb-green), 0.18),
    0 0 38px rgba(var(--sg-rgb-green), 0.48),
    0 16px 38px rgba(0, 0, 0, 0.36);
}

.sg-button--secondary:hover,
.sg-button--secondary:focus-visible {
  border-color: rgba(var(--sg-rgb-green), 0.72);
  background: rgba(var(--sg-rgb-green), 0.11);
  box-shadow:
    0 0 0 1px rgba(var(--sg-rgb-green), 0.08),
    0 0 24px rgba(var(--sg-rgb-green), 0.18);
}

.sg-button:focus-visible {
  outline: 3px solid rgba(var(--sg-rgb-green), 0.7);
  outline-offset: 4px;
}

/* =========================================================
   Action groups
   ========================================================= */

.sg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sg-actions-gap, 0.8rem);
  margin-top: var(--sg-actions-margin, 1.5rem);
}

.sg-actions--push {
  margin-top: auto;
  padding-top: var(--sg-actions-padding, 1.4rem);
}

.sg-actions--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sg-actions--grid .sg-button {
  width: 100%;
  min-width: 0;
  justify-content: center;
  text-align: center;
}

/* =========================================================
   Shared sections
   ========================================================= */
.sg-section {
  padding: 3rem var(--sg-page-padding);
}

.sg-section h2 {
  margin: 0;
  color: var(--sg-text);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
}

.sg-section-heading {
  max-width: 760px;
  margin-bottom: 2.5rem;
}

.sg-section-heading p:not(.sg-section-label),
.sg-section > p {
  max-width: 760px;
  color: var(--sg-muted);
  line-height: 1.7;
}

/* =========================================================
   About
   ========================================================= */
.sg-about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 4rem;
}

.sg-about__content p:not(.sg-section-label) {
  max-width: 720px;
  color: var(--sg-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.sg-about__pillars {
  display: grid;
  gap: 1rem;
}

/* Reusable character voice: informational quotes, without interactive styling. */
.sg-slime-quote {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--sg-green);
  border-radius: 0 12px 12px 0;
  background: rgba(16, 20, 28, 0.65);
}

.sg-slime-quote__avatar {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  object-fit: contain;
}

.sg-slime-quote blockquote {
  margin: 0;
}

.sg-slime-quote p {
  margin: 0;
  color: var(--sg-muted);
  line-height: 1.65;
  font-style: italic;
}

.sg-slime-quote figcaption {
  margin-top: 0.65rem;
  color: var(--sg-green);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sg-about__actions {
  --sg-actions-margin: 1.5rem;
}

/* =========================================================
   Games page
   ========================================================= */
.sg-games-page {
  width: min(100%, 1180px);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.sg-games-intro,
.sg-featured-game,
.sg-world-card,
.sg-games-suggestion {
  border: 1px solid rgba(var(--sg-rgb-green), 0.22);
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(var(--sg-rgb-green), 0.1), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
  box-shadow:
    0 0 0 1px rgba(var(--sg-rgb-green), 0.05),
    0 22px 70px rgba(0, 0, 0, 0.38);
}

.sg-games-intro {
  padding: clamp(1.6rem, 3vw, 2.4rem);
}

.sg-games-intro h2,
.sg-featured-game h2,
.sg-games-section-heading h2,
.sg-games-suggestion h2 {
  margin: 0 0 1rem;
  color: var(--sg-text);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.sg-games-intro p:not(.sg-section-label),
.sg-featured-game p:not(.sg-section-label),
.sg-world-card p,
.sg-games-section-heading p,
.sg-games-suggestion p:not(.sg-section-label) {
  color: var(--sg-muted);
  line-height: 1.7;
}

.sg-featured-game {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  overflow: hidden;
}

.sg-featured-game__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 1.5rem;
  overflow: hidden;
  border-right: 1px solid rgba(var(--sg-rgb-green), 0.16);
  background:
    radial-gradient(circle at center, rgba(var(--sg-rgb-green), 0.12), transparent 58%),
    rgba(var(--sg-rgb-bg), 0.38);
}

.sg-featured-game__visual img {
  width: 100%;
  max-width: 230px;
  height: auto;
  max-height: 430px;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 1rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.sg-featured-game__visual span {
  padding: 0.65rem 0.9rem;
  border: 1px dashed rgba(var(--sg-rgb-green), 0.36);
  border-radius: 999px;
  color: var(--sg-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sg-featured-game__content {
  padding: clamp(1.6rem, 3vw, 2.4rem);
}

.sg-featured-game__header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.sg-game-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.sg-featured-game .sg-game-chip-list {
  margin-top: 1.35rem;
}

.sg-game-chip-list span {
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(var(--sg-rgb-green), 0.24);
  border-radius: 999px;
  color: var(--sg-green);
  background: rgba(var(--sg-rgb-green), 0.07);
  font-size: 0.78rem;
  font-weight: 900;
}

.sg-game-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.sg-game-progress section {
  padding: 1.2rem;
  border: 1px solid rgba(var(--sg-rgb-green), 0.13);
  border-radius: 22px;
  background: rgba(var(--sg-rgb-bg), 0.45);
}

.sg-game-progress h3,
.sg-world-card h3 {
  margin: 0 0 0.8rem;
  color: var(--sg-text);
  font-size: 1.15rem;
}

.sg-game-progress ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-game-progress li {
  display: flex;
  gap: 0.65rem;
  color: var(--sg-muted);
  line-height: 1.55;
}

.sg-game-progress li::before {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.12rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.sg-game-progress li.is-progress::before {
  content: "";
  border: 2px solid rgba(var(--sg-rgb-green), 0.75);
  box-shadow: 0 0 12px rgba(var(--sg-rgb-green), 0.18);
}

.sg-game-progress li.is-planned::before {
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.035);
}

.sg-game-progress li.is-exploring::before {
  content: "◇";
  color: var(--sg-purple);
  border: 1px solid rgba(157, 78, 221, 0.35);
  background: rgba(157, 78, 221, 0.08);
}

.sg-game-actions {
  --sg-actions-margin: 1.6rem;
}

.sg-games-section-heading {
  max-width: 780px;
  padding-top: 1rem;
}

.sg-game-library {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.sg-world-card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 2.5vw, 2rem);
}

.sg-world-card p {
  margin: 0;
}

.sg-world-card .sg-game-chip-list {
  margin-top: auto;
  padding-top: 1.6rem;
}

.sg-world-card .sg-status {
  margin-bottom: 1rem;
}

.sg-games-suggestion {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.6rem, 3vw, 2.4rem);
}

/* =========================================================
   Games
   ========================================================= */
.sg-games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.sg-game-card {
  min-height: 230px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--sg-radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  overflow: hidden;
}

.sg-game-card--featured {
  position: relative;
  isolation: isolate;
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-color: rgba(var(--sg-rgb-green), 0.22);
  background:
    radial-gradient(circle at 85% 20%, rgba(var(--sg-rgb-green), 0.18), transparent 30%),
    linear-gradient(135deg, rgba(22, 32, 24, 0.95), rgba(12, 14, 22, 0.98));
}

.sg-game-card__art {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: 38%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.sg-game-card--featured::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(18, 25, 24, 0.98) 48%, rgba(18, 25, 24, 0) 88%);
  pointer-events: none;
}

.sg-game-card--featured > div,
.sg-game-card--featured > a {
  position: relative;
  z-index: 1;
}

.sg-game-card--featured > div {
  max-width: 55%;
}

.sg-game-card--coming {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-color: rgba(var(--sg-rgb-green), 0.24);
  background: linear-gradient(135deg, #18221d, #121622);
}

.sg-game-card__actions {
  --sg-actions-margin: 1.5rem;
}

.sg-game-card__status {
  margin: 0 0 1rem;
  color: var(--sg-green);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sg-game-card h3 {
  margin: 0 0 1rem;
  color: var(--sg-text);
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.sg-game-card p:not(.sg-game-card__status) {
  max-width: 640px;
  color: var(--sg-muted);
  line-height: 1.7;
}

/* Home: the current game beside direct entries into its wiki sections */
.sg-home-game__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 1.5rem;
}

.sg-home-trails ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-trail-tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  column-gap: 1rem;
  height: 100%;
  min-height: 9rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid rgba(var(--sg-rgb-green), 0.22);
  border-radius: var(--sg-radius-md);
  background:
    radial-gradient(circle at 12% 18%, rgba(var(--sg-rgb-green), 0.1), transparent 45%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02));
  color: var(--sg-text);
  text-decoration: none;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.sg-trail-tile:hover {
  border-color: rgba(var(--sg-rgb-green), 0.65);
  background-color: rgba(var(--sg-rgb-green), 0.06);
  box-shadow: 0 0 28px rgba(var(--sg-rgb-green), 0.14);
}

.sg-trail-tile:focus-visible {
  outline: 3px solid var(--sg-green);
  outline-offset: 3px;
}

/* Neverway art in an inventory-style slot, so the section entries do not repeat the Slime avatars
   used by the quotes below. Colours follow the Neverway ink and panel-border tokens. */
.sg-trail-tile__art {
  grid-row: 1 / span 3;
  align-self: center;
  width: 4rem;
  height: 4rem;
  border-radius: 12px;
  /* An inset outline keeps the 64 px content box, so the sprite scales by an exact factor. */
  outline: 1px solid rgba(193, 186, 255, 0.22);
  outline-offset: -1px;
  background: #0a0c1d;
  object-fit: contain;
}

.sg-trail-tile__art--portrait {
  object-fit: cover;
  object-position: 50% 8%;
}

/* The 19x28 Digital Skull still sits in a 38x56 content box inside the 64 px slot, an exact 2x scale (QC-06). */
.sg-trail-tile__art--pixel {
  padding: 4px 13px;
  object-fit: contain;
  image-rendering: pixelated;
}

.sg-trail-tile__count {
  color: var(--sg-green);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sg-trail-tile__title {
  margin: 0.2rem 0;
  font-family: var(--sg-font-display);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.sg-trail-tile__guide {
  color: var(--sg-muted);
  font-size: 0.9rem;
}

/* Home: what Slime Guides offers a studio */
.sg-studios__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1px solid rgba(var(--sg-rgb-purple), 0.4);
  border-radius: var(--sg-radius-lg);
  background:
    radial-gradient(circle at 90% 10%, rgba(var(--sg-rgb-purple), 0.22), transparent 40%),
    radial-gradient(circle at 5% 95%, rgba(var(--sg-rgb-green), 0.1), transparent 40%),
    linear-gradient(135deg, #141022, #0d1118);
}

.sg-studios__intro h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.05;
}

.sg-studios__intro p:not(.sg-section-label) {
  max-width: 34rem;
  margin: 0;
  color: var(--sg-muted);
  line-height: 1.7;
}

.sg-studios__points {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-studios__points li {
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--sg-green);
  border-radius: 0 var(--sg-radius-md) var(--sg-radius-md) 0;
  background: rgba(255, 255, 255, 0.04);
}

.sg-studios__points h3 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.sg-studios__points p {
  margin: 0;
  color: var(--sg-muted);
  line-height: 1.6;
}

/* =========================================================
   Worker / coming soon / 404 pages
   ========================================================= */
.sg-system-layout {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.sg-system-layout .sg-system-page {
  flex: 1 0 auto;
}

.sg-system-layout .sg-footer {
  flex: 0 0 auto;
  margin-top: auto;
}

.sg-system-page {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: clamp(2.5rem, 6vw, 5.5rem) var(--sg-page-padding);
  background:
    radial-gradient(circle at 24% 46%, rgba(var(--sg-rgb-green), 0.09), transparent 34%),
    var(--sg-bg);
}

.sg-system-page__panel {
  width: min(100%, 1120px);
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.sg-system-page__visual {
  min-width: 0;
  display: grid;
  place-items: center;
}

.sg-system-page__visual img {
  width: 100%;
  max-width: 580px;
  height: auto;
  display: block;
  filter: drop-shadow(0 24px 38px rgba(0, 0, 0, 0.35));
}

.sg-system-page__panel--coming-soon .sg-system-page__visual img {
  max-width: 620px;
}

.sg-system-page__content {
  max-width: 600px;
}

.sg-system-page__content h1 {
  margin: 0;
  color: var(--sg-text);
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 0.98;
}

.sg-system-page__content > p:not(.sg-section-label) {
  max-width: 560px;
  margin: 1.35rem 0 0;
  color: var(--sg-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.sg-system-page__actions {
  --sg-actions-margin: 1.8rem;
}

/* =========================================================
   Slimes
   ========================================================= */
.sg-slime-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.sg-slime-card {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  color: inherit;
  text-decoration: none;
  border: 1.5px solid var(--sg-border-green-strong);
  border-radius: var(--sg-radius-lg);
  background: #05070b;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(var(--sg-rgb-green), 0.1),
    0 0 34px rgba(var(--sg-rgb-green), 0.18),
    inset 0 0 28px rgba(var(--sg-rgb-green), 0.035),
    0 18px 55px rgba(0, 0, 0, 0.42);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.sg-slime-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(var(--sg-rgb-bg), 0.72) 0%,
    rgba(var(--sg-rgb-bg), 0.52) 30%,
    rgba(var(--sg-rgb-bg), 0.16) 58%,
    rgba(var(--sg-rgb-bg), 0) 100%
  );
  pointer-events: none;
}

.sg-slime-card__image {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: auto;
  max-width: none;
  height: 100%;
  display: block;
  pointer-events: none;
}

.sg-slime-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--sg-rgb-green), 0.65);
  box-shadow:
    0 0 0 1px rgba(var(--sg-rgb-green), 0.16),
    0 0 42px rgba(var(--sg-rgb-green), 0.24),
    inset 0 0 28px rgba(var(--sg-rgb-green), 0.055),
    0 22px 60px rgba(0, 0, 0, 0.48);
}

.sg-slime-card:focus-visible {
  outline: 3px solid rgba(var(--sg-rgb-green), 0.75);
  outline-offset: 4px;
}

.sg-slime-card__content {
  position: relative;
  z-index: 2;
  max-width: 360px;
}

.sg-slime-card__role {
  margin: 0 0 0.7rem;
  color: var(--sg-green);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sg-slime-card h3 {
  margin: 0 0 0.7rem;
  color: var(--sg-text);
}

.sg-slime-card p:not(.sg-slime-card__role) {
  color: #d1d5df;
}

.sg-slimes-preview__actions {
  --sg-actions-margin: 2rem;
}

/* =========================================================
   Footer
   ========================================================= */
.sg-footer {
  padding: 1.4rem var(--sg-page-padding);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(var(--sg-rgb-bg), 0.9);
}

.sg-footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

.sg-footer__copy {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  color: var(--sg-muted);
  font-size: 0.85rem;
}

.sg-footer__logo {
  grid-column: 2;
  justify-self: center;
}

.sg-footer__logo img {
  display: block;
  width: 72px;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(var(--sg-rgb-green), 0.18));
}

.sg-footer__legal {
  grid-column: 3;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  color: var(--sg-muted);
  font-size: 0.85rem;
}

.sg-footer__legal a {
  display: inline-flex;
  min-block-size: 44px;
  align-items: center;
}

.sg-footer__legal a:hover {
  color: var(--sg-green);
}

/* =========================================================
   Roadmap preview
   ========================================================= */
.sg-roadmap-preview {
  position: relative;
}

.sg-roadmap-preview__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.sg-roadmap-mini-card {
  padding: 1.5rem;
  border: 1px solid rgba(var(--sg-rgb-green), 0.24);
  border-radius: var(--sg-radius-md);
  background:
    radial-gradient(circle at top left, rgba(var(--sg-rgb-green), 0.1), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
  box-shadow:
    0 0 0 1px rgba(var(--sg-rgb-green), 0.06),
    0 18px 50px rgba(0, 0, 0, 0.35);
}

.sg-roadmap-mini-card__status {
  display: inline-flex;
  margin-bottom: 0.9rem;
  color: var(--sg-green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sg-roadmap-mini-card h3 {
  margin: 0 0 0.7rem;
  color: var(--sg-text);
  font-size: 1.35rem;
}

.sg-roadmap-mini-card p {
  margin: 0;
  color: var(--sg-muted);
  line-height: 1.6;
}

.sg-roadmap-preview__actions {
  --sg-actions-margin: 0.5rem;
}

/* Internal pages */
.sg-main--internal {
  min-height: 70vh;
}

.sg-page-hero {
  min-height: 17.5rem;
  padding: 3rem var(--sg-page-padding) 2rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(var(--sg-rgb-green), 0.08), transparent 32%),
    radial-gradient(circle at 80% 40%, rgba(var(--sg-rgb-purple), 0.08), transparent 36%);
}

.sg-page-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.3rem, 4.3vw, 4rem);
  line-height: 1;
}

.sg-page-hero p:not(.sg-section-label) {
  max-width: 720px;
  margin: 0;
  color: var(--sg-muted);
  line-height: 1.7;
}

.sg-page-section {
  padding: 2rem var(--sg-page-padding) 5rem;
}

/* =========================================================
   Contact page
   ========================================================= */
.sg-contact-layout {
  width: min(100%, 1180px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.65fr);
  gap: 1.5rem;
  align-items: start;
}

.sg-contact-card,
.sg-contact-side {
  border: 1px solid rgba(var(--sg-rgb-green), 0.22);
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(var(--sg-rgb-green), 0.1), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
  box-shadow:
    0 0 0 1px rgba(var(--sg-rgb-green), 0.05),
    0 22px 70px rgba(0, 0, 0, 0.38);
}

.sg-contact-card {
  padding: clamp(1.4rem, 2.5vw, 2rem);
}

.sg-contact-success {
  width: min(100%, 780px);
  margin: 0 auto;
}

.sg-contact-side {
  padding: clamp(1.4rem, 2.5vw, 2rem);
}

.sg-contact-card h2,
.sg-contact-side h2 {
  margin: 0 0 1.2rem;
  color: var(--sg-text);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.sg-contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.sg-contact-form__intro,
.sg-contact-form__honeypot,
.sg-contact-form__field--wide,
.sg-contact-form__submit {
  grid-column: 1 / -1;
}

.sg-contact-form__intro {
  margin: 0;
  color: var(--sg-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.sg-contact-form__honeypot {
  display: none;
}

.sg-contact-form__field {
  display: grid;
  align-content: start;
  gap: 0.5rem;
}

.sg-contact-form__field label {
  color: var(--sg-text);
  font-size: 0.9rem;
  font-weight: 800;
}

.sg-contact-form__field label span {
  color: var(--sg-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.sg-contact-form input,
.sg-contact-form select,
.sg-contact-form textarea {
  width: 100%;
  border: 1px solid rgba(var(--sg-rgb-green), 0.18);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: rgba(var(--sg-rgb-bg), 0.72);
  color: var(--sg-text);
  font: inherit;
}

.sg-contact-form textarea {
  min-height: 170px;
  resize: vertical;
}

.sg-contact-form input::placeholder,
.sg-contact-form textarea::placeholder {
  color: rgba(167, 173, 186, 0.62);
}

.sg-contact-form input:focus-visible,
.sg-contact-form select:focus-visible,
.sg-contact-form textarea:focus-visible {
  outline: none;
  border-color: rgba(var(--sg-rgb-green), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--sg-rgb-green), 0.12);
}

.sg-contact-form__help,
.sg-contact-form__submit p {
  margin: 0;
  color: var(--sg-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.sg-contact-form__submit {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.sg-contact-form__submit .sg-button {
  flex: 0 0 auto;
}

.sg-contact-form__submit a,
.sg-legal-note a {
  color: var(--sg-green);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.sg-contact-form__submit a:hover,
.sg-legal-note a:hover {
  text-decoration-thickness: 0.12em;
}

.sg-contact-form__submit a:focus-visible,
.sg-legal-note a:focus-visible {
  border-radius: 0.2rem;
  outline: 2px solid var(--sg-green);
  outline-offset: 3px;
}

.sg-legal-note {
  margin: 1.4rem 0 0;
  color: var(--sg-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.sg-contact-side ul {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-contact-side li {
  display: flex;
  gap: 0.65rem;
  color: var(--sg-muted);
  line-height: 1.6;
}

.sg-contact-side li::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.18rem;
  border-radius: 999px;
  background: var(--sg-green);
  color: var(--sg-dark-text);
  font-size: 0.72rem;
  font-weight: 900;
}

/* =========================================================
   About page
   ========================================================= */
.sg-about-page {
  width: min(100%, 1180px);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.sg-about-page__intro,
.sg-about-page__card,
.sg-about-page__cta {
  border: 1px solid rgba(var(--sg-rgb-green), 0.22);
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(var(--sg-rgb-green), 0.1), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
  box-shadow:
    0 0 0 1px rgba(var(--sg-rgb-green), 0.05),
    0 22px 70px rgba(0, 0, 0, 0.38);
}

.sg-about-page__intro {
  padding: clamp(1.6rem, 3vw, 2.4rem);
}

.sg-about-page__intro h2,
.sg-about-page__card h2,
.sg-about-page__cta h2 {
  margin: 0 0 1rem;
  color: var(--sg-text);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.sg-about-page__intro p:not(.sg-section-label),
.sg-about-page__card p:not(.sg-section-label),
.sg-about-page__cta p:not(.sg-section-label) {
  max-width: 850px;
  color: var(--sg-muted);
  line-height: 1.7;
}

.sg-about-page__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.sg-about-page__card {
  padding: clamp(1.4rem, 2.5vw, 2rem);
}

.sg-about-page__card--wide {
  grid-column: 1 / -1;
}

.sg-about-page__cta {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.6rem, 3vw, 2.4rem);
}

.sg-about-page__cta-actions {
  --sg-actions-margin: 0;
  --sg-actions-gap: 1rem;
  flex: 0 0 auto;
}

/* =========================================================
   Legal pages
   ========================================================= */
.sg-legal-layout {
  width: min(100%, 980px);
  margin: 0 auto;
}

.sg-legal-card {
  padding: clamp(1.5rem, 3vw, 2.3rem);
  border: 1px solid rgba(var(--sg-rgb-green), 0.22);
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(var(--sg-rgb-green), 0.1), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
  box-shadow:
    0 0 0 1px rgba(var(--sg-rgb-green), 0.05),
    0 22px 70px rgba(0, 0, 0, 0.38);
}

.sg-legal-card__header {
  padding-bottom: 1.3rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(var(--sg-rgb-green), 0.14);
}

.sg-legal-card__header h2 {
  margin: 0;
  color: var(--sg-text);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.sg-legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.sg-legal-block {
  padding: 1.25rem;
  border: 1px solid rgba(var(--sg-rgb-green), 0.12);
  border-radius: 22px;
  background: rgba(var(--sg-rgb-bg), 0.45);
}

.sg-legal-block:nth-child(3) {
  grid-column: 1 / -1;
}

.sg-legal-block h3 {
  margin: 0 0 0.8rem;
  color: var(--sg-text);
  font-size: 1.1rem;
}

.sg-legal-block p {
  margin: 0;
  color: var(--sg-muted);
  line-height: 1.7;
}

.sg-legal-block > p + p {
  margin-block-start: 1rem;
}

.sg-legal-block strong {
  color: var(--sg-text);
}

.sg-legal-block a {
  color: var(--sg-green);
  font-weight: 800;
}

.sg-legal-note {
  margin: 1.5rem 0 0;
  color: var(--sg-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Disclaimer page */
.sg-disclaimer-list {
  display: grid;
  gap: 1rem;
}

.sg-disclaimer-list .sg-legal-block {
  grid-column: auto;
}

/* =========================================================
   Roadmap page
   ========================================================= */
.sg-roadmap-section {
  padding-top: 1.5rem;
}

.sg-roadmap-board {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid rgba(var(--sg-rgb-green), 0.22);
  border-radius: 34px;
  background:
    radial-gradient(circle at top left, rgba(var(--sg-rgb-green), 0.1), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  box-shadow:
    0 0 0 1px rgba(var(--sg-rgb-green), 0.05),
    0 26px 90px rgba(0, 0, 0, 0.42);
}

.sg-roadmap-board__header {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.5rem 0.5rem 1.5rem;
  border-bottom: 1px solid rgba(var(--sg-rgb-green), 0.12);
  margin-bottom: 1rem;
}

.sg-roadmap-board__header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.sg-roadmap-board__header p:not(.sg-section-label) {
  max-width: 420px;
  margin: 0;
  color: var(--sg-muted);
  line-height: 1.6;
}

.sg-roadmap-list {
  display: grid;
  gap: 1rem;
  max-width: none;
}

.sg-roadmap-phase {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid rgba(var(--sg-rgb-green), 0.14);
  border-radius: 26px;
  background:
    radial-gradient(circle at top left, rgba(var(--sg-rgb-green), 0.075), transparent 34%),
    rgba(5, 7, 11, 0.52);
}

.sg-roadmap-phase--active {
  border-color: rgba(var(--sg-rgb-green), 0.44);
  box-shadow:
    0 0 0 1px rgba(var(--sg-rgb-green), 0.08),
    0 0 24px rgba(var(--sg-rgb-green), 0.1);
}

.sg-roadmap-phase__meta {
  display: grid;
  align-content: start;
  gap: 0.55rem;
}

.sg-roadmap-phase__meta span {
  color: var(--sg-green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sg-roadmap-phase__meta strong {
  color: var(--sg-text);
  font-size: 1.05rem;
}

.sg-status {
  width: fit-content;
  margin-top: 0.25rem;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sg-status--done {
  background: rgba(var(--sg-rgb-green), 0.95);
  color: #071006;
}

.sg-status--building {
  border: 1px solid rgba(var(--sg-rgb-green), 0.55);
  color: var(--sg-green);
  background: rgba(var(--sg-rgb-green), 0.1);
  box-shadow: 0 0 14px rgba(var(--sg-rgb-green), 0.12);
}

.sg-status--planned {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--sg-muted);
  background: rgba(255, 255, 255, 0.045);
}

.sg-status--exploring {
  border: 1px solid rgba(157, 78, 221, 0.35);
  color: #a65be1;
  background: rgba(157, 78, 221, 0.09);
}

.sg-roadmap-phase__content h2 {
  margin: 0 0 0.8rem;
  color: var(--sg-text);
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.sg-roadmap-phase__content p {
  max-width: 760px;
  margin: 0 0 1.2rem;
  color: var(--sg-muted);
  line-height: 1.7;
}

.sg-roadmap-tasks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-roadmap-tasks li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: var(--sg-muted);
  line-height: 1.55;
}

.sg-roadmap-tasks li::before {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.18rem;
  height: 1.18rem;
  margin-top: 0.12rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.sg-roadmap-tasks li.is-done::before {
  content: "✓";
  color: #071006;
  background: var(--sg-green);
}

.sg-roadmap-tasks li.is-progress::before {
  content: "";
  border: 2px solid rgba(var(--sg-rgb-green), 0.75);
  box-shadow: 0 0 12px rgba(var(--sg-rgb-green), 0.18);
}

.sg-roadmap-tasks li.is-planned::before {
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.035);
}

.sg-roadmap-tasks li.is-exploring::before {
  content: "◇";
  color: var(--sg-purple);
  border: 1px solid rgba(157, 78, 221, 0.35);
  background: rgba(157, 78, 221, 0.08);
}

/* =========================================================
   Slimes overview page
   ========================================================= */
.sg-slimes-page,
.sg-slime-detail-page {
  width: min(100%, 1180px);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.sg-slimes-intro,
.sg-slime-bio-card,
.sg-slimes-future,
.sg-slime-detail-hero,
.sg-slime-detail-card,
.sg-slime-detail-cta {
  border: 1px solid rgba(var(--sg-rgb-green), 0.22);
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(var(--sg-rgb-green), 0.1), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
  box-shadow:
    0 0 0 1px rgba(var(--sg-rgb-green), 0.05),
    0 22px 70px rgba(0, 0, 0, 0.38);
}

.sg-slimes-intro {
  padding: clamp(1.6rem, 3vw, 2.4rem);
}

.sg-slimes-intro h2,
.sg-slime-bio-card h2,
.sg-slime-detail-hero h2,
.sg-slime-detail-card h2,
.sg-slime-detail-cta h2 {
  margin: 0 0 1rem;
  color: var(--sg-text);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.sg-slimes-intro p:not(.sg-section-label),
.sg-slime-bio-card p:not(.sg-section-label),
.sg-slime-detail-hero p:not(.sg-section-label),
.sg-slime-detail-card p:not(.sg-section-label),
.sg-slime-detail-cta p:not(.sg-section-label) {
  color: var(--sg-muted);
  line-height: 1.7;
}

.sg-slime-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.sg-slime-bio-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.sg-slime-bio-card__visual {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 2 / 1;
  min-height: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(var(--sg-rgb-green), 0.16);
  background:
    radial-gradient(circle at center, rgba(var(--sg-rgb-green), 0.16), transparent 42%),
    rgba(var(--sg-rgb-bg), 0.42);
}

.sg-slime-bio-card__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.sg-slime-bio-card__visual span {
  padding: 0.65rem 0.9rem;
  border: 1px dashed rgba(var(--sg-rgb-green), 0.36);
  border-radius: 999px;
  color: var(--sg-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sg-slime-bio-card__content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(1.3rem, 2vw, 1.8rem);
}

.sg-slime-bio-card__content > p:not(.sg-section-label) {
  margin: 0;
}

.sg-slime-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
  margin-bottom: 0;
}

.sg-slime-chip-list span {
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(var(--sg-rgb-green), 0.24);
  border-radius: 999px;
  color: var(--sg-green);
  background: rgba(var(--sg-rgb-green), 0.07);
  font-size: 0.78rem;
  font-weight: 900;
}

.sg-slime-actions {
  --sg-actions-margin: 0;
}

.sg-slimes-future {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.6rem, 3vw, 2.4rem);
}

.sg-slimes-future h2 {
  margin: 0 0 1rem;
  color: var(--sg-text);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.sg-slimes-future p:not(.sg-section-label) {
  max-width: 760px;
  color: var(--sg-muted);
  line-height: 1.7;
}

/* =========================================================
   Slime detail page
   ========================================================= */
.sg-slime-detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  overflow: hidden;
}

.sg-slime-detail-hero__content {
  padding: clamp(1.6rem, 3vw, 2.4rem);
}

.sg-slime-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.sg-slime-detail-card {
  padding: clamp(1.4rem, 2.5vw, 2rem);
}

.sg-slime-clean-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-slime-clean-list li {
  display: flex;
  gap: 0.65rem;
  color: var(--sg-muted);
  line-height: 1.6;
}

.sg-slime-clean-list li::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.18rem;
  border-radius: 999px;
  background: var(--sg-green);
  color: var(--sg-dark-text);
  font-size: 0.72rem;
  font-weight: 900;
}

.sg-slime-work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.3rem;
}

.sg-slime-work-card {
  padding: 1.2rem;
  border: 1px solid rgba(var(--sg-rgb-green), 0.13);
  border-radius: 22px;
  background: rgba(var(--sg-rgb-bg), 0.45);
}

.sg-slime-work-card h3 {
  margin: 0.9rem 0 0.65rem;
  color: var(--sg-text);
  font-size: 1.15rem;
}

.sg-slime-work-card p {
  margin: 0;
  color: var(--sg-muted);
  line-height: 1.6;
}

.sg-slime-detail-cta {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.6rem, 3vw, 2.4rem);
}

/* Hub composition roles; home stays open, inner pages retain centered reading space. */
.sg-editorial-intro {
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  padding: 0;
}

.sg-about-page__intro.sg-editorial-intro,
.sg-games-intro.sg-editorial-intro,
.sg-slimes-intro.sg-editorial-intro {
  display: block;
  padding-bottom: 0;
}

.sg-about-page__intro.sg-editorial-intro h2,
.sg-games-intro.sg-editorial-intro h2,
.sg-slimes-intro.sg-editorial-intro h2 {
  margin-bottom: 0;
}

.sg-about-page__cta > div:first-child,
.sg-games-suggestion > div,
.sg-slimes-future > div,
.sg-slime-detail-cta > div {
  flex: 1;
  min-width: 0;
}

.sg-games-suggestion > .sg-button,
.sg-slimes-future > .sg-button,
.sg-slime-detail-cta > .sg-button {
  flex: 0 0 auto;
}

.sg-directory-return {
  --sg-actions-margin: 0;
}

@media (min-width: 901px) {
  .sg-games-page,
  .sg-about-page,
  .sg-slimes-page,
  .sg-slime-detail-page,
  .sg-contact-layout,
  .sg-legal-layout {
    width: min(calc(100% - 2 * clamp(24px, 4vw, 64px)), var(--sg-content-width, 1180px));
    padding-inline: 0;
    padding-top: 3rem;
    gap: 2.5rem;
  }

  .sg-legal-layout {
    --sg-content-width: 980px;
  }

  .sg-editorial-intro {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 2.5rem;
    padding-bottom: 0.5rem;
  }

  .sg-editorial-intro h2,
  .sg-about-page__card h2,
  .sg-slime-detail-card h2 {
    font-size: clamp(1.6rem, 2vw, 2rem);
    line-height: 1.2;
  }

  .sg-about-page__card,
  .sg-slime-detail-card {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.035);
    box-shadow: none;
    border-radius: var(--sg-radius-md);
  }

  .sg-about-page__card--wide,
  .sg-slime-detail-card--work {
    padding: 0.5rem 0;
    border: 0;
    background: none;
  }

  .sg-slime-work-card {
    border: 0;
    border-radius: 0;
    border-top: 1px solid rgba(var(--sg-rgb-green), 0.2);
    background: none;
    padding: 1.25rem 0;
  }

  .sg-roadmap-board {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .sg-roadmap-board__header {
    padding: 0 0 2rem;
    border-bottom: 0;
  }

  .sg-roadmap-list {
    position: relative;
    padding-left: 2.5rem;
    gap: 1.5rem;
  }

  .sg-roadmap-list::before {
    position: absolute;
    content: "";
    left: 0.6rem;
    top: 2rem;
    bottom: 2rem;
    width: 2px;
    background: linear-gradient(
      var(--sg-green),
      rgba(var(--sg-rgb-green), 0.25) 35%,
      rgba(var(--sg-rgb-purple), 0.4)
    );
  }

  .sg-roadmap-phase {
    position: relative;
    grid-template-columns: 200px minmax(0, 1fr);
    background: #11151d;
    border-color: rgba(255, 255, 255, 0.12);
    border-radius: var(--sg-radius-md);
  }

  .sg-roadmap-phase::before {
    position: absolute;
    content: "";
    left: -2.4rem;
    top: 1.85rem;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--sg-muted);
    border-radius: 50%;
    background: var(--sg-bg);
  }

  .sg-roadmap-phase--complete::before {
    border-color: var(--sg-green);
    background: var(--sg-green);
  }

  .sg-roadmap-phase--active {
    border-color: rgba(var(--sg-rgb-green), 0.45);
    background: linear-gradient(135deg, #18221c, #11151d);
  }

  .sg-roadmap-phase--active::before {
    border-color: var(--sg-green);
    box-shadow: 0 0 16px rgba(var(--sg-rgb-green), 0.3);
  }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1150px) {
  .sg-games-grid,
  .sg-home-game__layout,
  .sg-studios__panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .sg-about {
    grid-template-columns: 1fr;
  }

  .sg-contact-layout {
    grid-template-columns: 1fr;
  }

  .sg-roadmap-preview__grid {
    grid-template-columns: 1fr;
  }

  .sg-roadmap-board__header {
    flex-direction: column;
  }

  .sg-roadmap-phase {
    grid-template-columns: 1fr;
  }

  .sg-roadmap-tasks {
    grid-template-columns: 1fr;
  }

  .sg-about-page__grid {
    grid-template-columns: 1fr;
  }

  .sg-about-page__cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .sg-slime-directory,
  .sg-slime-detail-grid,
  .sg-slime-work-grid {
    grid-template-columns: 1fr;
  }

  .sg-slime-bio-card,
  .sg-slime-detail-hero {
    grid-template-columns: 1fr;
  }

  .sg-slime-bio-card__visual {
    border-right: 0;
    border-bottom: 1px solid rgba(var(--sg-rgb-green), 0.16);
  }

  .sg-slime-detail-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .sg-slimes-future {
    align-items: flex-start;
    flex-direction: column;
  }

  .sg-featured-game,
  .sg-game-progress,
  .sg-game-library {
    grid-template-columns: 1fr;
  }

  .sg-featured-game__visual {
    min-height: 280px;
    border-right: 0;
    border-bottom: 1px solid rgba(var(--sg-rgb-green), 0.16);
  }

  .sg-featured-game__header,
  .sg-games-suggestion {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  :root {
    --sg-page-padding: 1.5rem;
  }

  .sg-system-page {
    min-height: 0;
    place-items: start center;
    padding-block: 2rem 3.5rem;
  }

  .sg-system-page__panel {
    max-width: 680px;
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .sg-system-page__visual img,
  .sg-system-page__panel--coming-soon .sg-system-page__visual img {
    max-width: 440px;
  }

  .sg-system-page__content {
    max-width: none;
  }

  .sg-system-page__content h1 {
    font-size: clamp(2.35rem, 11vw, 3.75rem);
  }

  .sg-skip-link {
    top: 4.25rem;
  }

  .sg-header {
    grid-template-columns: 1fr auto;
    gap: 1.1rem;
    padding-block: 0.8rem;
  }

  .sg-js .sg-header {
    grid-template-columns: auto 1fr auto;
  }

  .sg-js .sg-menu-toggle {
    display: inline-flex;
    min-inline-size: 44px;
    min-block-size: 44px;
    align-items: center;
    justify-content: center;
    justify-self: start;
    border: 1px solid rgba(var(--sg-rgb-green), 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--sg-text);
    font-size: 1.2rem;
  }

  .sg-header__nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
  }

  .sg-js .sg-header__nav {
    display: none;
  }

  .sg-header__brand {
    justify-self: center;
  }

  .sg-header__brand img {
    width: 118px;
  }

  .sg-header__actions {
    justify-self: end;
  }

  .sg-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    opacity: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(6px);
    transition: opacity 0.2s ease;
  }

  .sg-mobile-menu {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    display: flex;
    width: min(82vw, 340px);
    overflow-y: auto;
    padding: 1.4rem;
    flex-direction: column;
    gap: 1.5rem;
    background: rgba(10, 12, 19, 0.98);
    border-right: 1px solid rgba(var(--sg-rgb-green), 0.2);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }

  .sg-mobile-menu img {
    display: block;
    width: 120px;
    max-width: 100%;
    height: auto;
    flex: 0 0 auto;
  }

  .sg-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    min-inline-size: 44px;
    min-block-size: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(var(--sg-rgb-green), 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--sg-text);
    font-size: 1.4rem;
  }

  .sg-mobile-menu nav {
    display: grid;
    gap: 0.65rem;
  }

  .sg-mobile-menu nav a {
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--sg-text);
    font-weight: 800;
  }

  .sg-mobile-menu nav a:hover {
    background: rgba(var(--sg-rgb-green), 0.13);
    color: var(--sg-green);
  }

  .sg-mobile-menu__legal {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    color: var(--sg-muted);
    font-size: 0.85rem;
  }

  .sg-mobile-menu__legal a {
    display: inline-flex;
    min-block-size: 44px;
    align-items: center;
  }

  body.menu-open .sg-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.menu-open .sg-mobile-menu {
    transform: translateX(0);
  }

  .sg-hero {
    min-height: 0;
    display: grid;
    align-items: initial;
    padding: 0;
    background: var(--sg-bg);
  }

  .sg-hero::after {
    order: -1;
    content: "";
    display: block;
    height: clamp(13rem, 56.2vw, 27rem);
    background: url("../assets/slimeguides/banners/sg-home-hero.webp") center / contain no-repeat;
  }

  .sg-hero__content {
    max-width: none;
    padding: clamp(1.75rem, 6vw, 2.5rem) var(--sg-page-padding) clamp(1.5rem, 4vw, 2rem);
    background:
      radial-gradient(circle at 12% 20%, rgba(var(--sg-rgb-green), 0.08), transparent 48%),
      var(--sg-bg);
  }

  .sg-hero .sg-eyebrow {
    color: var(--sg-green);
    font-size: 0.8rem;
    line-height: 1.3;
  }

  .sg-hero__content > p:not(.sg-eyebrow) {
    margin-block: 1rem 0;
    font-size: 1rem;
    line-height: 1.6;
  }

  .sg-hero__actions {
    gap: 0.75rem;
  }

  .sg-hero__actions .sg-button {
    flex: 1 1 13rem;
  }

  .sg-hero h1 {
    max-width: 15ch;
    margin: 0;
    font-size: clamp(2.15rem, 9.5vw, 2.5rem);
    line-height: 1;
  }

  .sg-section {
    padding-block: 2.25rem;
  }

  .sg-about {
    gap: 2.5rem;
  }

  .sg-slime-quote {
    gap: 1rem;
    padding: 1.2rem;
  }

  .sg-slime-quote__avatar {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
  }

  .sg-game-card {
    min-height: 230px;
    padding: 1.5rem;
  }

  .sg-game-card--featured {
    padding: 0;
  }

  .sg-game-card--featured::after {
    display: none;
  }

  .sg-game-card__art {
    position: static;
    order: -1;
    width: 100%;
    height: 10rem;
    object-position: center 55%;
  }

  .sg-game-card--featured > div {
    max-width: none;
    padding: 1.5rem 1.5rem 0;
  }

  .sg-game-card--featured > a {
    align-self: stretch;
    width: auto;
    margin: 1.25rem 1.5rem 1.5rem;
  }

  .sg-slime-card {
    padding: 1.5rem;
  }

  .sg-slime-card__content {
    max-width: 260px;
  }

  .sg-footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .sg-footer__copy,
  .sg-footer__logo,
  .sg-footer__legal {
    grid-column: auto;
    grid-row: auto;
    justify-self: center;
  }

  .sg-footer__legal {
    justify-content: center;
    flex-wrap: wrap;
  }

  .sg-page-hero {
    padding: 2.5rem var(--sg-page-padding) 1.75rem;
  }

  .sg-page-section {
    padding: 1.5rem var(--sg-page-padding) 4rem;
  }

  .sg-contact-card,
  .sg-contact-side {
    padding: 1.4rem;
    border-radius: 22px;
  }

  .sg-contact-form {
    grid-template-columns: 1fr;
  }

  .sg-contact-form__intro,
  .sg-contact-form__field--wide,
  .sg-contact-form__submit {
    grid-column: auto;
  }

  .sg-contact-form__submit {
    align-items: flex-start;
    flex-direction: column;
  }

  .sg-roadmap-phase {
    padding: 1.25rem;
    border-radius: 22px;
  }

  .sg-legal-grid {
    grid-template-columns: 1fr;
  }

  .sg-legal-block:nth-child(3) {
    grid-column: auto;
  }

  .sg-legal-card {
    padding: 1.4rem;
    border-radius: 22px;
  }

  .sg-about-page__intro,
  .sg-about-page__card,
  .sg-about-page__cta {
    padding: 1.4rem;
    border-radius: 22px;
  }

  .sg-slimes-intro,
  .sg-slimes-future,
  .sg-slime-bio-card__content,
  .sg-slime-detail-hero__content,
  .sg-slime-detail-card,
  .sg-slime-detail-cta {
    padding: 1.4rem;
  }

  .sg-slimes-intro,
  .sg-slime-bio-card,
  .sg-slimes-future,
  .sg-slime-detail-hero,
  .sg-slime-detail-card,
  .sg-slime-detail-cta {
    border-radius: 22px;
  }

  .sg-slime-bio-card__visual {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  .sg-games-intro,
  .sg-featured-game__content,
  .sg-world-card,
  .sg-games-suggestion {
    padding: 1.4rem;
  }

  .sg-games-intro,
  .sg-featured-game,
  .sg-world-card,
  .sg-games-suggestion {
    border-radius: 22px;
  }

  .sg-featured-game__visual {
    min-height: auto;
    padding: 1.25rem;
    border-right: 0;
    border-bottom: 1px solid rgba(var(--sg-rgb-green), 0.16);
  }

  .sg-featured-game__visual img {
    max-width: 260px;
    max-height: 380px;
  }

  .sg-slime-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--sg-page-padding);
    margin-inline: calc(var(--sg-page-padding) * -1);
    padding-inline: var(--sg-page-padding);
    padding-bottom: 0.75rem;
  }

  .sg-slime-card {
    min-width: min(82vw, 320px);
    width: min(82vw, 320px);
    flex: 0 0 auto;
    aspect-ratio: auto;
    display: block;
    padding: 0;
    scroll-snap-align: start;
  }

  .sg-slime-card__image,
  .sg-slime-card::after {
    inset: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .sg-slime-card__image {
    object-fit: cover;
  }

  .sg-slime-card__content {
    max-width: none;
  }

  .sg-slime-card__heading {
    aspect-ratio: 16 / 9;
    padding: 1rem;
  }

  .sg-slime-card h3 {
    font-size: 1.3rem;
  }

  .sg-slime-card__description {
    margin: 0;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid rgba(var(--sg-rgb-green), 0.16);
  }

  .sg-slime-grid::-webkit-scrollbar {
    height: 8px;
  }

  .sg-slime-grid::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(var(--sg-rgb-green), 0.28);
  }

  .sg-slime-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
  }
}

@media (max-width: 480px) {
  .sg-home-trails ul {
    grid-template-columns: 1fr;
  }

  .sg-trail-tile {
    min-height: 0;
  }

  .sg-header {
    gap: 0.5rem;
    padding-inline: clamp(1rem, 5vw, 1.5rem);
  }

  .sg-button {
    width: 100%;
  }
}

/* =========================================================
   Image heroes
   ========================================================= */

.sg-page-hero--image {
  position: relative;
  overflow: hidden;
  background-color: #030807;
  isolation: isolate;
}

.sg-page-hero--image::before,
.sg-page-hero--image::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.sg-page-hero--image::before {
  z-index: 0;
  background: var(--sg-hero-image) var(--sg-hero-position, right center) / contain no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.18) 18%, #000 48%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.18) 18%, #000 48%);
}

.sg-page-hero--image::after {
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(3, 8, 7, var(--sg-hero-start, 0.97)) 0%,
    rgba(3, 8, 7, var(--sg-hero-mid-a, 0.9)) 30%,
    rgba(3, 8, 7, var(--sg-hero-mid-b, 0.64)) 52%,
    rgba(3, 8, 7, var(--sg-hero-end, 0.18)) 100%
  );
}

.sg-page-hero--image > * {
  position: relative;
  z-index: 2;
}

.sg-page-hero--image p:not(.sg-section-label) {
  max-width: var(--sg-hero-copy-max, 680px);
}

@media (min-width: 769px) {
  .sg-page-hero--image {
    /* Heights grow a little with the viewport and stop early, so large screens get no tall, empty
       banners. */
    --sg-hero-height: clamp(360px, 25vw, 440px);
    /* Right edge of the hero copy, which keeps the header's outer gutter. */
    --sg-hero-copy-end: calc(var(--sg-page-padding) + min(520px, 42vw));
    min-height: var(--sg-hero-height);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: 2rem;
    padding-inline: var(--sg-page-padding);
  }

  /* The artwork always reaches from just before the end of the copy to the right edge; scenes
     wider than that (the canon's extended Slime profile art) continue under the copy behind the
     fade, as on the home hero. Narrower art is cropped at the top and bottom instead, around each
     page's `--sg-hero-position` focus. */
  .sg-page-hero--image::before {
    inset: 0 0 0 auto;
    width: min(
      100%,
      max(
        calc(100% - var(--sg-hero-copy-end) + 6rem),
        calc(var(--sg-hero-height) * var(--sg-hero-art-ratio, 1.777778))
      )
    );
    background-size: cover;
    background-position: var(--sg-hero-position, right center);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%);
    mask-image: linear-gradient(90deg, transparent, #000 18%);
  }

  .sg-page-hero--image::after {
    background: linear-gradient(
      90deg,
      #030807 0,
      rgba(3, 8, 7, 0.92) calc(var(--sg-hero-copy-end) - 6rem),
      rgba(3, 8, 7, 0.78) var(--sg-hero-copy-end),
      rgba(3, 8, 7, 0.22) calc(var(--sg-hero-copy-end) + 8rem),
      transparent calc(var(--sg-hero-copy-end) + 14rem)
    );
  }

  .sg-page-hero--image h1,
  .sg-page-hero--image p:not(.sg-section-label) {
    max-width: min(520px, 42vw);
  }

  .sg-page-hero--image h1 {
    font-size: clamp(2.3rem, 3vw, 3.4rem);
    line-height: 1.08;
  }

  .sg-page-hero--guide-slime,
  .sg-page-hero--combat-slime,
  .sg-page-hero--mystery-slime,
  .sg-page-hero--worker-slime {
    --sg-hero-height: clamp(300px, 20.8vw, 400px);
  }

  .sg-page-hero--contact,
  .sg-page-hero--privacy,
  .sg-page-hero--disclaimer,
  .sg-page-hero--impressum {
    --sg-hero-height: clamp(360px, 18vw, 420px);
  }

  .sg-page-hero--contact::before,
  .sg-page-hero--privacy::before,
  .sg-page-hero--disclaimer::before,
  .sg-page-hero--impressum::before {
    width: 70%;
    background-size: auto 100%;
  }
}

.sg-page-hero--about,
.sg-page-hero--games,
.sg-page-hero--slimes,
.sg-page-hero--guide-slime,
.sg-page-hero--combat-slime,
.sg-page-hero--mystery-slime,
.sg-page-hero--worker-slime,
.sg-page-hero--roadmap,
.sg-page-hero--contact,
.sg-page-hero--privacy,
.sg-page-hero--disclaimer,
.sg-page-hero--impressum {
  --sg-hero-start: 0.9;
  --sg-hero-mid-a: 0.68;
  --sg-hero-mid-b: 0.28;
  --sg-hero-end: 0.02;
  --sg-hero-mobile-start: 0.96;
  --sg-hero-mobile-mid: 0.84;
  --sg-hero-mobile-end: 0.28;
}

/* Individual hero images */

.sg-page-hero--about {
  --sg-hero-position: right 58%;
  --sg-hero-art-ratio: 1.778723;
  --sg-hero-image: url("../assets/slimeguides/banners/sg-about-hero.webp");
}

.sg-page-hero--games {
  --sg-hero-position: right 56%;
  --sg-hero-art-ratio: 1.778723;
  --sg-hero-image: url("../assets/slimeguides/banners/sg-games-hero.webp");
}

.sg-page-hero--slimes {
  --sg-hero-position: right 52%;
  --sg-hero-art-ratio: 1.874439;
  --sg-hero-image: url("../assets/slimeguides/banners/sg-slimes-hero.webp");
  --sg-hero-copy-max: 620px;
}

.sg-page-hero--guide-slime {
  --sg-hero-position: right 56%;
  --sg-hero-art-ratio: 2.866741;
  --sg-hero-image: url("../assets/slimeguides/banners/sg-guide-slime-hero.webp");
  --sg-hero-copy-max: 620px;
}

.sg-page-hero--combat-slime {
  --sg-hero-position: right 62%;
  --sg-hero-art-ratio: 3.417891;
  --sg-hero-image: url("../assets/slimeguides/banners/sg-combat-slime-hero.webp");
  --sg-hero-copy-max: 620px;
}

.sg-page-hero--mystery-slime {
  --sg-hero-position: right 58%;
  --sg-hero-art-ratio: 3.540802;
  --sg-hero-image: url("../assets/slimeguides/banners/sg-mystery-slime-hero.webp");
  --sg-hero-copy-max: 620px;
}

.sg-page-hero--worker-slime {
  --sg-hero-position: right 58%;
  --sg-hero-art-ratio: 3.196005;
  --sg-hero-image: url("../assets/slimeguides/banners/sg-worker-slime-hero.webp");
  --sg-hero-copy-max: 620px;
}

.sg-page-hero--roadmap {
  --sg-hero-art-ratio: 1.666667;
  --sg-hero-image: url("../assets/slimeguides/banners/sg-roadmap-hero.webp");
}

.sg-page-hero--contact {
  --sg-hero-art-ratio: 3.39823;
  --sg-hero-image: url("../assets/slimeguides/banners/sg-contact-hero.webp");
}

.sg-page-hero--privacy {
  --sg-hero-art-ratio: 3.832335;
  --sg-hero-image: url("../assets/slimeguides/banners/sg-privacy-hero.webp");
  --sg-hero-copy-max: 720px;
}

.sg-page-hero--disclaimer {
  --sg-hero-art-ratio: 3.952381;
  --sg-hero-image: url("../assets/slimeguides/banners/sg-disclaimer-hero.webp");
}

.sg-page-hero--impressum {
  --sg-hero-art-ratio: 4.076433;
  --sg-hero-image: url("../assets/slimeguides/banners/sg-impressum-hero.webp");
}
@media (max-width: 768px) {
  .sg-page-hero {
    min-height: clamp(14rem, 52vw, 17rem);
  }

  .sg-page-hero--image {
    --sg-mobile-hero-art-height: calc(100vw / var(--sg-hero-art-ratio, 1.777778));

    min-height: 0;
    padding: calc(var(--sg-mobile-hero-art-height) + 1rem) var(--sg-page-padding) 2rem;
    background: #030807;
  }

  .sg-page-hero--image::before {
    inset: 0 0 auto;
    height: var(--sg-mobile-hero-art-height);
    background-position: var(--sg-hero-mobile-position, center bottom);
    -webkit-mask-image: none;
    mask-image: none;
  }

  .sg-page-hero--image::after {
    display: none;
  }

  .sg-page-hero--image p:not(.sg-section-label) {
    max-width: min(100%, var(--sg-hero-copy-max, 680px));
  }
}

@media (min-width: 769px) and (max-width: 1050px) {
  .sg-page-hero--contact::before {
    background-position: 40% center;
  }
}

@media (max-width: 768px) {
  .sg-page-hero--games {
    --sg-hero-mobile-position: 58% bottom;
  }

  .sg-page-hero--slimes {
    --sg-hero-mobile-position: 58% bottom;
  }

  .sg-page-hero--guide-slime,
  .sg-page-hero--combat-slime,
  .sg-page-hero--mystery-slime,
  .sg-page-hero--worker-slime {
    /* The wide profile art would be a thin strip; keep at least 2:1 and crop the scenery on the
       left, because the canon places each Slime in the right third. */
    --sg-mobile-hero-art-height: max(calc(100vw / var(--sg-hero-art-ratio)), 50vw);
    --sg-hero-mobile-position: right center;
  }

  .sg-page-hero--guide-slime::before,
  .sg-page-hero--combat-slime::before,
  .sg-page-hero--mystery-slime::before,
  .sg-page-hero--worker-slime::before {
    background-size: cover;
  }

  .sg-page-hero--roadmap {
    --sg-hero-mobile-position: 62% bottom;
  }

  .sg-page-hero--contact {
    --sg-hero-mobile-position: 58% bottom;
  }
}

@media (max-width: 520px) {
  .sg-actions--grid {
    grid-template-columns: 1fr;
  }
}

.sg-slime-detail-hero--text {
  grid-template-columns: 1fr;
}

.sg-slime-detail-hero--text .sg-slime-detail-hero__content {
  max-width: 820px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .sg-button,
  .sg-slime-card,
  .sg-menu-backdrop,
  .sg-mobile-menu {
    transition: none;
  }

  .sg-button:hover,
  .sg-button:focus-visible,
  .sg-slime-card:hover {
    transform: none;
  }
}
