:root {
  color-scheme: light;
  --vg-bg: #eef2f6;
  --vg-ink: #15202b;
  --vg-muted: #637083;
  --vg-soft: #f7f9fb;
  --vg-surface: #ffffff;
  --vg-line: #d6e0ea;
  --vg-link: #0b6474;
  --vg-link-hover: #a34f16;
  --vg-accent: #0b6474;
  --vg-accent-strong: #084957;
  --vg-warm: #b45f1d;
  --vg-shadow: 0 16px 36px rgba(21, 32, 43, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--vg-bg);
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 0 16px 44px;
  overflow-x: auto;
  color: var(--vg-ink);
  background:
    linear-gradient(180deg, #f8fafc 0, #eef2f6 420px, #e8eef4 100%),
    var(--vg-bg);
  font-family: Tahoma, Verdana, Geneva, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

body.vgmapper-home {
  padding-right: 0;
  padding-left: 0;
}

body:not(.vgmapper-home) > :not(.vg-site-header):not(.vg-page-intro):not(script):not(style) {
  max-width: min(1080px, calc(100vw - 32px));
  margin-right: auto;
  margin-left: auto;
}

.vg-site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  margin-right: -16px;
  margin-left: -16px;
  border-bottom: 1px solid rgba(214, 224, 234, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.vgmapper-home .vg-site-header {
  margin-right: 0;
  margin-left: 0;
}

.vg-site-header__inner {
  display: flex;
  width: min(1180px, calc(100vw - 32px));
  min-height: 66px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.vg-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--vg-ink);
  text-decoration: none;
}

.vg-brand__mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #a9c3ce;
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(11, 100, 116, 0.98), rgba(20, 32, 43, 0.98)),
    var(--vg-accent);
  font-weight: 800;
}

.vg-brand__name {
  display: block;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
}

.vg-brand__meta {
  display: block;
  margin-top: 2px;
  color: var(--vg-muted);
  font-size: 12px;
  line-height: 1.2;
}

.vg-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.vg-nav a,
.vg-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--vg-ink);
  font-weight: 700;
  text-decoration: none;
}

.vg-nav a:hover,
.vg-nav a:focus-visible {
  border-color: var(--vg-line);
  background: var(--vg-soft);
  color: var(--vg-accent-strong);
}

.vg-button {
  border-color: rgba(11, 100, 116, 0.25);
  color: #ffffff;
  background: var(--vg-accent);
}

.vg-button:hover,
.vg-button:focus-visible {
  color: #ffffff;
  background: var(--vg-accent-strong);
}

.vg-button--secondary {
  border-color: var(--vg-line);
  color: var(--vg-ink);
  background: rgba(255, 255, 255, 0.92);
}

.vg-button--secondary:hover,
.vg-button--secondary:focus-visible {
  color: var(--vg-accent-strong);
  background: #ffffff;
}

.vg-page-intro {
  width: min(1080px, calc(100vw - 32px));
  margin: 28px auto 20px;
}

.vg-page-kicker {
  margin: 0 0 6px;
  color: var(--vg-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.vg-page-intro h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.18;
}

.vg-page-intro p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--vg-muted);
}

.vg-legacy-hidden {
  display: none !important;
}

.vg-home-main {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
}

.vg-home-hero {
  min-height: 430px;
  margin-top: 24px;
  display: flex;
  align-items: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(10, 18, 27, 0.92), rgba(10, 18, 27, 0.54), rgba(10, 18, 27, 0.18)),
    url("/Images/vgmapper-archive-hero.png") center / cover no-repeat;
  box-shadow: var(--vg-shadow);
}

.vg-home-hero__content {
  width: min(680px, 100%);
  padding: 48px;
}

.vg-home-hero h1 {
  margin: 0 0 12px;
  font-size: 44px;
  line-height: 1.04;
}

.vg-home-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 16px;
}

.vg-home-actions {
  display: flex;
  margin-top: 24px;
  flex-wrap: wrap;
  gap: 10px;
}

.vg-section {
  margin-top: 34px;
}

.vg-section h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.2;
}

.vg-section-lead {
  max-width: 760px;
  margin: -4px 0 18px;
  color: var(--vg-muted);
}

.vg-stat-grid,
.vg-feature-grid,
.vg-path-grid {
  display: grid;
  gap: 14px;
}

.vg-stat-grid {
  grid-template-columns: repeat(3, 1fr);
}

.vg-feature-grid {
  grid-template-columns: repeat(3, 1fr);
}

.vg-path-grid {
  grid-template-columns: repeat(4, 1fr);
}

.vg-locale-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.vg-card {
  border: 1px solid var(--vg-line);
  border-radius: 8px;
  padding: 18px;
  background: var(--vg-surface);
  box-shadow: 0 10px 24px rgba(21, 32, 43, 0.06);
}

.vg-stat strong {
  display: block;
  color: var(--vg-accent-strong);
  font-size: 30px;
  line-height: 1;
}

.vg-stat span,
.vg-card p {
  color: var(--vg-muted);
}

.vg-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.25;
}

.vg-card p {
  margin: 0;
}

.vg-card a {
  font-weight: 800;
}

.vg-original-note {
  border-left: 4px solid var(--vg-warm);
}

.vg-locale-card {
  overflow: hidden;
  padding: 0;
}

.vg-locale-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.vg-locale-card__body {
  padding: 18px;
}

.vg-locale-card__body h3 {
  margin: 0 0 8px;
}

table {
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

td,
th {
  vertical-align: top;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--vg-link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: var(--vg-link-hover);
}

a img {
  transition: transform 0.16s ease, filter 0.16s ease;
}

a:hover img,
a:focus-visible img {
  filter: saturate(1.08) contrast(1.04);
  transform: translateY(-1px);
}

a[data-vg-external] {
  cursor: pointer;
}

img.vg-missing-image,
img.vg-blank-image,
a[data-vg-external] img[src^="http://"],
a[data-vg-external] img[src^="https://"] {
  display: none !important;
}

.vg-empty-tile {
  display: none !important;
}

pre {
  padding: 16px;
  overflow-x: auto;
  border: 1px solid var(--vg-line);
  border-radius: 8px;
  background: var(--vg-surface);
}

body:not(.vgmapper-home) table[bgcolor="#FFFFFF"],
body:not(.vgmapper-home) table[bgcolor="#ffffff"] {
  background: transparent !important;
}

body.vg-page-links table[width="716"],
body.vg-page-mappers table[width="907"] {
  display: grid;
  width: min(960px, calc(100vw - 32px)) !important;
  margin-top: 14px;
  gap: 12px;
}

body.vg-page-links table[width="716"] {
  grid-template-columns: repeat(3, 1fr);
}

body.vg-page-mappers table[width="907"] {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

body.vg-page-links table[width="716"] tbody,
body.vg-page-links table[width="716"] tr,
body.vg-page-mappers table[width="907"] tbody,
body.vg-page-mappers table[width="907"] tr {
  display: contents;
}

body.vg-page-links table[width="716"] td,
body.vg-page-mappers table[width="907"] td {
  display: block;
  width: auto !important;
  min-height: 82px;
  border: 1px solid var(--vg-line);
  border-radius: 8px;
  padding: 10px;
  background: var(--vg-surface);
  box-shadow: 0 8px 18px rgba(21, 32, 43, 0.05);
}

body.vg-page-links table[width="716"] td {
  text-align: center;
}

body.vg-page-links table[width="716"] td:empty {
  display: none;
}

body.vg-page-links table[width="716"] img {
  display: block;
  width: 100%;
  max-width: 234px;
  margin: 0 auto;
  border-radius: 4px;
}

body.vg-page-mappers table[width="907"] td {
  color: var(--vg-ink);
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.35;
}

body.vg-page-mappers table[width="907"] img {
  display: block;
  width: 54px !important;
  height: 54px !important;
  margin-bottom: 8px;
  border-radius: 8px;
  object-fit: cover;
}

body.vg-page-archive table:not([width="716"]):not([width="907"]) {
  margin-top: 12px;
}

body.vg-page-archive td,
body.vg-page-archive th {
  padding: 6px 8px;
}

body.vg-page-archive td[class],
body.vg-page-archive th[class] {
  color: var(--vg-ink);
  font-size: 12px !important;
  line-height: 1.35;
}

body.vg-page-archive img {
  border-radius: 4px;
}

body.vg-page-game > p {
  color: var(--vg-muted);
  font-size: 13px;
  font-weight: 800;
}

body.vg-page-game > p.style4,
body.vg-page-game > p strong,
body.vg-page-game > p span {
  color: var(--vg-ink);
  font-family: inherit !important;
  font-size: 15px !important;
  line-height: 1.25;
}

body.vg-page-game table.vg-map-table {
  display: grid;
  width: min(1080px, calc(100vw - 32px)) !important;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin: 12px auto 24px;
}

body.vg-page-game table.vg-map-table tbody,
body.vg-page-game table.vg-map-table tr.vg-map-card-row {
  display: contents;
}

body.vg-page-game table.vg-map-table tr.vg-map-label-row {
  display: none;
}

body.vg-page-game table.vg-map-table td.vg-map-tile {
  display: block;
  width: auto !important;
  min-height: 82px;
  border: 1px solid var(--vg-line);
  border-radius: 8px;
  padding: 12px;
  background: var(--vg-surface);
  box-shadow: 0 8px 18px rgba(21, 32, 43, 0.05);
  color: var(--vg-ink);
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.3;
}

body.vg-page-game .vg-map-tile-link {
  display: flex;
  min-height: 56px;
  align-items: center;
  color: var(--vg-link);
  text-decoration: none;
}

body.vg-page-game .vg-map-tile-link:hover,
body.vg-page-game .vg-map-tile-link:focus-visible {
  color: var(--vg-link-hover);
}

body.vg-page-game .vg-map-tile-title {
  display: block;
}

body.vg-page-game table.vg-map-table img:not(.vg-missing-image):not(.vg-blank-image) {
  display: block;
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1;
  margin: 0 auto 8px;
  border-radius: 6px;
  object-fit: cover;
}

@media (max-width: 900px) {
  .vg-site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
    gap: 10px;
  }

  .vg-nav {
    justify-content: flex-start;
  }

  .vg-home-hero {
    min-height: 380px;
  }

  .vg-home-hero__content {
    padding: 34px;
  }

  .vg-home-hero h1 {
    font-size: 34px;
  }

  .vg-stat-grid,
  .vg-feature-grid,
  .vg-path-grid,
  .vg-locale-grid,
  body.vg-page-links table[width="716"],
  body.vg-page-mappers table[width="907"] {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  body {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 13px;
  }

  .vg-site-header {
    margin-right: -10px;
    margin-left: -10px;
  }

  .vg-site-header__inner,
  .vg-home-main,
  .vg-page-intro,
  body:not(.vgmapper-home) > :not(.vg-site-header):not(.vg-page-intro):not(script):not(style) {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }

  .vg-home-hero {
    min-height: 340px;
    margin-top: 10px;
  }

  .vg-home-hero__content {
    padding: 24px;
  }

  .vg-home-hero h1 {
    font-size: 30px;
  }

  .vg-stat-grid,
  .vg-feature-grid,
  .vg-path-grid,
  .vg-locale-grid,
  body.vg-page-links table[width="716"],
  body.vg-page-mappers table[width="907"] {
    grid-template-columns: 1fr;
  }

  table {
    width: 100% !important;
  }
}
