:root {
  color-scheme: light;
  --base-light: #f5f6f0; --base-white: #fffefa; --base-dark: #101e19;
  --base-green: #175b42; --base-sage: #b9cbc0; --base-lime: #c9f597;
  --canvas: var(--base-light); --surface: var(--base-white); --ink: var(--base-dark);
  --muted: color-mix(in srgb,var(--base-dark) 63%,var(--base-sage));
  --line: color-mix(in srgb,var(--base-sage) 45%,var(--base-white));
  --link: var(--base-green); --tint: color-mix(in srgb,var(--base-green) 10%,var(--base-white)); --inverse: var(--base-dark);
  --hero-ink: var(--base-white); --hero-sub: color-mix(in srgb,var(--base-sage),var(--base-white)); --hero-accent: var(--base-lime);
  --shadow: 0 12px 32px color-mix(in srgb,var(--base-dark) 7%,transparent); --focus: var(--link);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: var(--base-dark);
  --surface: color-mix(in srgb,var(--base-dark) 82%,var(--base-sage));
  --ink: var(--base-white); --muted: var(--base-sage);
  --line: color-mix(in srgb,var(--base-dark) 70%,var(--base-sage));
  --link: color-mix(in srgb,var(--base-lime),var(--base-sage));
  --tint: color-mix(in srgb,var(--base-dark) 69%,var(--base-sage));
  --shadow: 0 12px 32px color-mix(in srgb,var(--base-dark) 50%,transparent); --focus: var(--base-lime);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --canvas: var(--base-dark);
    --surface: color-mix(in srgb,var(--base-dark) 82%,var(--base-sage));
    --ink: var(--base-white); --muted: var(--base-sage);
    --line: color-mix(in srgb,var(--base-dark) 70%,var(--base-sage));
    --link: color-mix(in srgb,var(--base-lime),var(--base-sage));
    --tint: color-mix(in srgb,var(--base-dark) 69%,var(--base-sage));
    --shadow: 0 12px 32px color-mix(in srgb,var(--base-dark) 50%,transparent); --focus: var(--base-lime);
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.58 system-ui, sans-serif; }
a { color: inherit; text-underline-offset: .22em; }
a:focus-visible, summary:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.skip { position: absolute; top: 1rem; left: 1rem; transform: translateY(-220%); z-index: 2; background: var(--surface); padding: .6rem; }
.skip:focus { transform: none; }
.wrap { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.masthead, .footer { background: var(--surface); }
.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner, .footer-inner { display: flex; align-items: center; gap: 1rem 1.5rem; min-height: 72px; padding: .7rem 0; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 770; text-decoration: none; letter-spacing: -.02em; white-space: nowrap; }
.brand img { width: 32px; height: 32px; border-radius: .4rem; }
.masthead nav { margin-left: auto; }
.masthead nav, .footer nav { display: flex; flex-wrap: wrap; gap: .55rem 1.3rem; }
.masthead nav a, .footer nav a { font-size: .92rem; font-weight: 640; text-decoration: none; color: var(--muted); }
.masthead nav a:hover, .footer nav a:hover { color: var(--link); text-decoration: underline; }
.theme-switch { display: inline-flex; gap: .45rem; align-items: center; justify-content: center; min-height: 44px; padding: .45rem .8rem; background: var(--tint); color: var(--ink); border: 1px solid var(--line); border-radius: .65rem; font: 650 .85rem/1.3 system-ui, sans-serif; cursor: pointer; }
.theme-switch:hover { border-color: var(--link); }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.035em; line-height: 1.04; }
h1 { font-size: clamp(2.6rem, 6.2vw, 5.25rem); }
h2 { font-size: clamp(1.95rem, 3.6vw, 3.2rem); }
h3 { font-size: 1.18rem; line-height: 1.2; letter-spacing: -.018em; }
.directory-hero {
  position: relative;
  display: grid; grid-template-columns: 1.45fr 1fr; align-items: center;
  gap: clamp(1.25rem, 4vw, 4rem); margin-top: 2rem;
  padding: clamp(1.75rem, 5.7vw, 5rem); border-radius: 1.35rem;
  color: var(--hero-ink); background:
    radial-gradient(ellipse at 100% 0%, color-mix(in srgb,var(--base-sage) 24%,transparent), transparent 61%),
    linear-gradient(115deg, var(--inverse), color-mix(in srgb,var(--base-green) 62%,var(--base-dark)));
}
.directory-hero :focus-visible { outline-color: var(--hero-accent); }
.hero-copy h1 { max-width: 13ch; }
.hero-copy p { margin: 1.2rem 0 1.55rem; max-width: 45ch; color: var(--hero-sub); font-size: clamp(1rem, 1.8vw, 1.16rem); }
.button { display: inline-flex; gap: .7rem; align-items: center; min-height: 45px; padding: .63rem .9rem; font-weight: 760; border-radius: .52rem; text-decoration: none; background: var(--hero-accent); color: var(--base-dark); }
.button:hover { background: color-mix(in srgb,var(--base-lime),var(--base-white)); }
.hero-index { border: 1px solid color-mix(in srgb,var(--base-sage) 65%,var(--base-green)); border-radius: .85rem; padding: 1rem 1.15rem .4rem; background: color-mix(in srgb,var(--base-dark) 24%,transparent); }
.hero-index h2 { margin: .2rem 0 .8rem; font: 730 1.06rem/1.25 system-ui, sans-serif; letter-spacing: -.02em; }
.hero-index a { display: flex; justify-content: space-between; gap: 1rem; padding: .72rem 0; border-top: 1px solid color-mix(in srgb,var(--base-sage) 58%,var(--base-green)); text-decoration: none; }
.hero-index a:hover { text-decoration: underline; }
.platform-count { color: var(--hero-accent); display: inline-flex; gap: .72rem; font-variant-numeric: tabular-nums; }
.section { margin: clamp(2.7rem, 6vw, 5rem) 0; scroll-margin-top: 1rem; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .65rem; margin-bottom: 1.2rem; }
.text-link { color: var(--link); font-size: .91rem; font-weight: 700; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.feature-card { min-width: 0; position: relative; display: block; padding: 1.23rem 1.25rem 2.3rem; border: 1px solid var(--line); border-radius: .95rem; background: var(--surface); text-decoration: none; box-shadow: var(--shadow); }
.feature-card h3 { margin: .65rem 0 .55rem; font-size: 1.27rem; }
.feature-card p, .guide-row p, .guide-notes p, .footer p { color: var(--muted); }
.feature-card p, .guide-row p { font-size: .93rem; }
.feature-card:hover, .guide-row:hover { background: var(--tint); }
.feature-card:hover h3, .guide-row:hover h3 { text-decoration: underline; }
.label, .eyebrow { font-size: .72rem; letter-spacing: .085em; font-weight: 770; text-transform: uppercase; color: var(--link); }
.card-arrow { position: absolute; right: 1rem; bottom: .65rem; color: var(--link); font-weight: 800; }
.guide-search { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin-bottom: 1rem; }
.guide-search label { font-weight: 720; }
.guide-search input { width: min(100%, 27rem); min-height: 45px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: .55rem; padding: .4rem .7rem; }
.guide-search input::placeholder { color: var(--muted); }
.search-empty { margin: 1rem 0; color: var(--muted); }
.catalog { display: grid; gap: .8rem; }
.platform { border: 1px solid var(--line); border-radius: .9rem; background: var(--surface); scroll-margin-top: 1rem; }
.platform > summary, .genre > summary { cursor: pointer; padding: .85rem 1rem; font-weight: 760; }
.platform > summary small { display: inline-block; margin-left: .7rem; font-weight: 550; color: var(--muted); }
.genre { margin: 0 .7rem .7rem; background: var(--canvas); border: 1px solid var(--line); border-radius: .65rem; }
.genre > summary { font-size: .91rem; }
.guide-list { list-style: none; padding: 0; margin: 0 .6rem .6rem; display: grid; gap: .35rem; }
.guide-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem .95rem; border-radius: .45rem; background: var(--surface); text-decoration: none; }
.guide-row p { margin-top: .3rem; }
.guide-row > span { color: var(--link); }
.guide-notes { padding: 1.4rem 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: .85rem; }
.guide-notes h2 { font-size: 1.65rem; margin-bottom: .55rem; }
.guide-notes p { max-width: 75ch; }
.footer { border-top: 1px solid var(--line); }
.footer-inner { justify-content: space-between; font-size: .9rem; }
.guide { max-width: 850px; padding-top: 1.55rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .55rem; color: var(--muted); font-size: .9rem; }
.guide-hero { margin: 1.2rem 0; padding: clamp(1.4rem, 4vw, 3.05rem); border: 1px solid var(--line); border-top: 4px solid var(--link); border-radius: .9rem; background: var(--surface); }
.guide h1 { font-size: clamp(2.15rem, 5.6vw, 4.15rem); max-width: 19ch; }
.guide .eyebrow { margin-bottom: .7rem; }
.intro { font-size: 1.12rem; max-width: 58ch; margin: 1.1rem 0; color: var(--muted); }
.credit { font-size: .88rem; color: var(--muted); margin-top: .8rem; }
.article-body { max-width: 74ch; padding: 0 .25rem; overflow-wrap: anywhere; }
.article-body h2 { margin: 1.75rem 0 .65rem; font-size: 1.86rem; }
.article-body h3 { margin-top: 1.2rem; }
.article-body p, .article-body li { margin: .55rem 0; }
.article-body a, .back a { color: var(--link); }
.article-body ul, .article-body ol { padding-inline-start: 1.55rem; }
.back { margin: 1.5rem 0 2.7rem; font-weight: 700; }
@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  .directory-hero { grid-template-columns: 1fr; margin-top: 1rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-wrap: wrap; }
}
@media (max-width: 500px) {
  .masthead-inner { flex-wrap: wrap; gap: .4rem .7rem; }
  .masthead nav { order: 3; width: 100%; margin: 0 0 .1rem; gap: .9rem; }
  .theme-switch { margin-left: auto; padding-inline: .5rem; font-size: .75rem; }
  .brand { font-size: .94rem; }
  .guide h1 { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.guide-figure { max-width: 74ch; margin: 1.45rem 0; }
.guide-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: .85rem; background: var(--surface); }
.guide-figure figcaption { margin-top: .4rem; color: var(--muted); font-size: .82rem; }
.article-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1rem 0; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: .55rem .7rem; text-align: left; }
.article-body th { background: var(--tint); }


.game-landing { --game-display: system-ui, sans-serif; --game-backdrop: color-mix(in srgb, var(--base-dark) 70%, black); }
.game-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(390px, 49vw, 550px);
  margin-top: clamp(1rem, 2.5vw, 2rem);
  overflow: hidden;
  border: 1px solid var(--base-green);
  border-radius: 1.05rem;
  color: var(--base-white);
  background: radial-gradient(ellipse at 78% 26%, var(--base-green), var(--base-dark) 57%, var(--game-backdrop));
  box-shadow: var(--shadow);
}
.game-hero-art, .game-hero::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.game-hero-art { z-index: -2; object-fit: cover; object-position: 62% 57%; }
.game-hero::after {
  z-index: -1;
  content: "";
  background: linear-gradient(90deg, color-mix(in srgb, var(--game-backdrop) 98%, transparent) 0%, color-mix(in srgb, var(--game-backdrop) 86%, transparent) 30%, color-mix(in srgb, var(--game-backdrop) 46%, transparent) 58%, transparent 100%),
              linear-gradient(0deg, color-mix(in srgb, var(--game-backdrop) 75%, transparent), transparent 58%);
}
.game-hero-copy { padding: clamp(1.4rem, 5.8vw, 4.7rem); }
.game-hero-copy h1 { max-width: 14ch; font: 900 clamp(2.7rem, 6.4vw, 5.8rem)/.99 var(--game-display); letter-spacing: -.066em; text-wrap: balance; }
.game-hero-copy p { max-width: 35ch; margin: 1.2rem 0 1.7rem; color: var(--hero-sub); font-size: clamp(1rem, 2vw, 1.16rem); }
.game-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.35rem; }
.game-hero-actions .button { background: var(--base-lime); color: var(--base-dark); }
.game-hero-secondary { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; color: var(--base-white); font-weight: 700; }
.game-hero-actions a:focus-visible { outline-color: var(--base-lime); }
.game-landing .section-heading h2 { font: 850 clamp(1.65rem, 3.4vw, 2.75rem)/1.06 var(--game-display); letter-spacing: -.055em; }
.game-route-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.85rem, 2vw, 1.3rem); }
.game-route { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: .85rem; background: var(--surface); box-shadow: var(--shadow); }
.game-route-lead { position: relative; display: flex; align-items: flex-end; min-height: 186px; isolation: isolate; background: var(--base-dark); color: var(--base-white); text-decoration: none; }
.game-route-lead img, .game-route-lead::before { position: absolute; inset: 0; width: 100%; height: 100%; }
.game-route-lead img { z-index: -2; object-fit: cover; object-position: center; }
.game-route-lead::before { content: ""; z-index: -1; background: linear-gradient(0deg, var(--game-backdrop) 0%, color-mix(in srgb, var(--game-backdrop) 72%, transparent) 40%, color-mix(in srgb, var(--game-backdrop) 7%, transparent) 88%); }
.game-route-lead:focus-visible { outline-offset: -4px; outline-color: var(--base-lime); }
.game-route-name { width: 100%; padding: 1rem; }
.game-route-name .label { color: var(--base-lime); }
.game-route-name h3 { display: flex; align-items: flex-start; justify-content: space-between; gap: .55rem; margin-top: .35rem; font-size: clamp(1.18rem, 2.1vw, 1.6rem); }
.game-route-name h3 span { color: var(--base-lime); }
.game-route-body { display: flex; flex-direction: column; flex: 1; padding: .9rem 1rem 1rem; }
.game-route-body p { min-height: 3.2em; color: var(--muted); font-size: .93rem; }
.game-route-body ul { margin: .8rem 0 0; padding: 0; list-style: none; }
.game-route-body li+li { border-top: 1px solid var(--line); }
.game-route-body a { display: flex; align-items: center; justify-content: space-between; gap: .7rem; min-height: 45px; color: var(--link); font-size: .92rem; font-weight: 700; text-decoration: none; }
.game-route-body a:hover, .game-route-lead:hover h3 { text-decoration: underline; }
.game-platforms { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.2rem; }
.game-platforms a { display: inline-flex; align-items: center; min-height: 44px; gap: .5rem; padding: .35rem .75rem; border: 1px solid var(--line); border-radius: .45rem; background: var(--surface); font-weight: 680; text-decoration: none; }
.game-platforms a:hover { border-color: var(--link); color: var(--link); }
.game-platforms small { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 830px) {
  .game-route-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 590px) {
  .game-hero { min-height: 420px; }
  .game-hero-art { object-position: 67% center; }
  .game-hero::after { background: linear-gradient(0deg, color-mix(in srgb, var(--game-backdrop) 96%, transparent) 0%, color-mix(in srgb, var(--game-backdrop) 80%, transparent) 44%, color-mix(in srgb, var(--game-backdrop) 16%, transparent) 100%); }
  .game-hero-copy { width: 100%; }
  .game-route-grid { grid-template-columns: 1fr; }
  .game-route-body p { min-height: auto; }
}


.game-hub-hero { min-height: 350px; }
.game-hub-hero .game-hero-copy { padding: clamp(1.3rem, 5vw, 3.25rem); }
.game-hub-hero h1 { font-size: clamp(2.1rem, 6vw, 4.5rem); max-width: 19ch; }
.game-hub-hero .label { margin: 0 0 .8rem; color: var(--base-lime); }
.game-hub-stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 1rem; padding: 0; margin: 0; list-style: none; }
.game-hub-stages .feature-card { height: 100%; }
