@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 750;
  font-display: swap;
  src: url("assets/dm-sans-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/space-mono-latin.woff2") format("woff2");
}
.arrow-icon {
  position: relative;
  display: inline-block;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.arrow-icon::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
}

.arrow-icon::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 6px;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  transform: rotate(-45deg);
}

.arrow-icon.arrow-back {
  transform: rotate(180deg);
}

:root {
  --paper: #f6f5f0;
  --ink: #202522;
  --muted: #747970;
  --line: #dedfd6;
  --green: #3c6251;
  --lime: #d5e7bb;
  --white: #fff;
  --mono: "Space Mono", monospace;
  --body: "DM Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
}

body:has(dialog[open]) {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #6b9475;
  outline-offset: 4px;
}

button {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

button[hidden],
a[hidden],
div[hidden],
p[hidden] {
  display: none !important;
}

.wrap {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 48px;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--ink);
  color: white;
  padding: 12px;
  z-index: 100;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  letter-spacing: -0.8px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.brand-light {
  font-weight: 400;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-header nav > a:not(.button) {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 49px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 5px;
  transition:
    background 0.18s,
    transform 0.18s;
}

.button:hover {
  transform: translateY(-1px);
}

.button span {
  font-size: 19px;
  line-height: 1;
}

.button-dark {
  background: var(--ink);
  color: var(--paper);
}

.button-dark:hover {
  background: #3b443d;
}

.button-cream {
  background: var(--paper);
  color: var(--ink);
}

.small {
  min-height: 42px;
  padding: 9px 16px;
  gap: 22px;
  font-size: 12px;
}

.hero {
  position: relative;
  min-height: 490px;
  border-radius: 8px;
  overflow: hidden;
  color: var(--paper);
  background: #1b1d1b;
  max-width: 1344px;
  padding: 51px 53px 69px;
}

.hero-image {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(19, 23, 20, 0.7), transparent 75%),
    url("assets/archive-hero.webp?v=23873c380666");
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  max-width: 520px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  margin: 0 0 20px;
}

.eyebrow.light {
  color: #ced3cb;
  letter-spacing: 0.9px;
  font-size: 9px;
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--lime);
  border-radius: 50%;
  margin-right: 9px;
  vertical-align: 1px;
}

h1 {
  font-size: clamp(54px, 6.5vw, 90px);
  line-height: 0.99;
  letter-spacing: -5px;
  font-weight: 500;
  margin: 33px 0 24px;
}

h1 > span {
  color: var(--lime);
}

.hero-description {
  font-size: 14px;
  color: #d2d5ce;
  line-height: 1.7;
  margin: 0 0 26px;
}

.hero-bottom {
  position: absolute;
  bottom: 21px;
  left: 53px;
  right: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #b7bcb3;
  gap: 20px;
  font-size: 10px;
}

.hero-bottom p {
  margin: 0;
}

.archive {
  padding-top: 68px;
  padding-bottom: 65px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 27px;
  gap: 30px;
}

.section-heading .eyebrow {
  margin-bottom: 10px;
}

h2 {
  font-size: 39px;
  line-height: 1.15;
  letter-spacing: -1.6px;
  font-weight: 500;
  margin: 0;
}

.heading-dot {
  color: var(--green);
}

.section-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}

.filters {
  padding: 18px 0;
  border-block: 1px solid var(--line);
}

.primary-filters {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  height: 46px;
  flex: 1;
  min-width: 150px;
  display: flex;
  align-items: center;
  gap: 13px;
  background: #eeeee7;
  padding: 0 16px;
  border-radius: 5px;
}

.search-icon {
  width: 13px;
  height: 13px;
  border: 1.6px solid #777f75;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.search-icon:after {
  position: absolute;
  content: "";
  width: 6px;
  height: 1.6px;
  background: #777f75;
  bottom: -3px;
  right: -4px;
  transform: rotate(45deg);
}

.search-box input {
  width: 100%;
  border: 0;
  background: transparent;
  outline-offset: 10px;
  font-size: 12px;
  color: var(--ink);
  min-width: 0;
}

.search-box input::placeholder {
  color: #858a80;
}

.select-wrap {
  display: flex;
  align-items: center;
}

.select-wrap select {
  appearance: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  min-height: 44px;
  background: transparent;
  padding: 8px 12px;
  font-size: 12px;
  max-width: 210px;
  color: var(--ink);
}

.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 62px;
  font-size: 11px;
  color: var(--muted);
}

.results-bar p {
  margin: 0;
}

.text-button {
  padding: 8px 0;
  border: 0;
  background: transparent;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.save-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 25px;
  row-gap: 33px;
}

.empty-state {
  border: 1px dashed var(--line);
  padding: 60px 24px;
  text-align: center;
  border-radius: 6px;
  max-width: 100%;
  margin: 15px 0;
}

.empty-state h3 {
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 8px;
}

.empty-state p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 25px;
}

.how-section {
  padding-block: 50px;
  display: grid;
  grid-template-columns: 1fr 1.65fr;
  gap: 70px;
  border-top: 1px solid var(--line);
}

.how-intro h2 {
  font-size: 34px;
  letter-spacing: -1.3px;
  line-height: 1.2;
}

.how-intro .eyebrow {
  margin-bottom: 16px;
}

.how-intro > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 12px;
  max-width: 290px;
  line-height: 1.8;
}

.text-link {
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  gap: 30px;
  margin-top: 8px;
}

.how-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 7px;
}

.guide-symbol {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid #c9d0c1;
  border-radius: 50%;
  font-size: 21px;
  color: var(--green);
  margin-bottom: 20px;
}

.how-cards h3 {
  font-size: 14px;
  line-height: 1.4;
  margin: 0 0 12px;
  font-weight: 600;
}

.how-cards p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}

.contribute-section {
  max-width: 1344px;
  border-radius: 6px;
  background: #e4e9dd;
  padding: 37px 42px;
  margin-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.contribute-section .eyebrow {
  margin-bottom: 11px;
  color: #60725c;
}

.contribute-section h2 {
  font-size: 36px;
}

.contribute-section p:not(.eyebrow) {
  font-size: 12px;
  color: #6d7966;
  margin: 12px 0 0;
}

.site-footer {
  min-height: 140px;
  display: flex;
  align-items: center;
  gap: 25px;
}

.footer-brand {
  font-size: 14px;
  letter-spacing: -0.5px;
}

.site-footer p {
  color: var(--muted);
  font-size: 10px;
  flex: 1;
}

.site-footer > div {
  display: flex;
  gap: 20px;
  font-size: 10px;
}

.site-footer a {
  text-decoration: none;
}

dialog {
  border: 0;
  border-radius: 9px;
  padding: 27px 30px 24px;
  width: min(600px, calc(100% - 28px));
  max-height: calc(100dvh - 36px);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 150px #0004;
}

dialog::backdrop {
  background: rgba(21, 27, 22, 0.65);
  backdrop-filter: blur(4px);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.dialog-header .eyebrow {
  margin: 0;
  font-size: 8px;
}

.close-button {
  font-size: 25px;
  line-height: 1;
  border: 0;
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.close-button:hover {
  background: #e8e9e0;
}

.guide-page {
  max-width: 850px;
  padding-top: 40px;
  padding-bottom: 70px;
}

.guide-page h1 {
  font-size: 54px;
  letter-spacing: -2.5px;
  line-height: 1.08;
  margin: 20px 0 26px;
}

.guide-page > p {
  font-size: 16px;
  color: var(--muted);
}

.guide-page h2 {
  font-size: 27px;
  margin: 45px 0 18px;
}

.guide-page h3 {
  font-size: 18px;
  margin: 25px 0 10px;
}

.guide-page p,
.guide-page li {
  font-size: 14px;
  line-height: 1.85;
}

.guide-page li + li {
  margin-top: 12px;
}

.guide-page code {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.guide-page pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #eaece1;
  padding: 20px;
  border-radius: 5px;
}

.guide-page .button {
  margin-top: 14px;
}

.back-link {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}

@media (min-width: 1500px) {
  .hero,
  .contribute-section {
    max-width: 1344px;
  }
}

@media (max-width: 1440px) {
  .hero,
  .contribute-section {
    margin-inline: 48px;
  }

  .hero {
    padding-inline: 48px;
  }

  .hero-bottom {
    left: 48px;
  }
}

@media (max-width: 1100px) {
  .wrap {
    padding-inline: 32px;
  }

  .hero,
  .contribute-section {
    margin-inline: 32px;
  }

  .hero {
    padding-inline: 40px;
  }

  .hero-bottom {
    left: 40px;
    right: 30px;
  }

  .site-header nav {
    gap: 20px;
  }

  .save-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .how-section {
    grid-template-columns: 1fr 1.8fr;
    gap: 35px;
  }

  .section-note {
    font-size: 11px;
  }

  .hero-image {
    background-position: 58% center;
  }

  .site-footer {
    gap: 18px;
  }
}

@media (max-width: 780px) {
  .wrap {
    padding-inline: 24px;
  }

  .site-header {
    height: 82px;
  }

  .brand {
    font-size: 17px;
  }

  .site-header nav > a:not(.button) {
    display: none;
  }

  .site-header nav .button {
    font-size: 10px;
    gap: 12px;
    padding-inline: 12px;
  }

  .hero,
  .contribute-section {
    margin-inline: 24px;
  }

  .hero {
    min-height: 455px;
    padding: 35px 30px 66px;
  }

  .hero-image {
    background-position: 50% center;
    background-image:
      linear-gradient(90deg, rgba(19, 23, 20, 0.9), rgba(19, 23, 20, 0.3)),
      url("assets/archive-hero.webp?v=23873c380666");
  }

  .hero-copy {
    max-width: 390px;
  }

  .hero .eyebrow {
    font-size: 8px;
  }

  h1 {
    font-size: 70px;
    letter-spacing: -4px;
  }

  .hero-bottom {
    left: 30px;
    right: 25px;
    align-items: start;
  }

  .hero-bottom p {
    max-width: 140px;
  }

  .archive {
    padding-top: 46px;
  }

  .section-note {
    display: none;
  }

  .section-heading {
    margin-bottom: 22px;
  }

  h2 {
    font-size: 34px;
  }

  .primary-filters {
    flex-wrap: wrap;
    gap: 10px;
  }

  .search-box {
    flex-basis: calc(100% - 85px);
    order: 0;
  }

  .select-wrap {
    flex: 1;
    order: 2;
  }

  .select-wrap select {
    width: 100%;
    max-width: none;
  }

  .results-bar {
    min-height: 55px;
  }

  .save-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 20px;
  }

  .how-section {
    display: block;
    padding-block: 35px;
  }

  .how-intro > p:not(.eyebrow) {
    max-width: 420px;
  }

  .how-cards {
    margin-top: 32px;
    gap: 25px;
  }

  .how-intro h2 {
    font-size: 31px;
  }

  .contribute-section {
    display: block;
    padding: 30px;
    margin-top: 15px;
  }

  .contribute-section h2 {
    font-size: 31px;
  }

  .contribute-section .button {
    margin-top: 23px;
  }

  .site-footer {
    flex-wrap: wrap;
    padding-block: 30px;
    gap: 15px;
  }

  .site-footer p {
    flex-basis: 65%;
    margin: 0;
  }

  .site-footer > div {
    width: 100%;
    gap: 24px;
  }

  .guide-page h1 {
    font-size: 42px;
  }

  .guide-page {
    padding-top: 25px;
  }
}

@media (max-width: 430px) {
  .wrap {
    padding-inline: 18px;
  }

  .hero,
  .contribute-section {
    margin-inline: 18px;
  }

  .hero {
    padding-inline: 25px;
    min-height: 455px;
  }

  .hero-bottom {
    left: 25px;
    right: 22px;
  }

  .hero-image {
    background-position: 49% center;
  }

  .hero-description {
    font-size: 12px;
  }

  .hero .eyebrow {
    letter-spacing: 0.4px;
  }

  .brand {
    font-size: 15px;
    gap: 8px;
  }

  .site-header .button {
    font-size: 9px;
    gap: 8px;
    padding-inline: 10px;
  }

  .save-grid {
    column-gap: 14px;
  }

  .how-cards {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .how-cards article {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 0 16px;
    align-items: start;
  }

  .guide-symbol {
    grid-row: span 2;
    margin: 0;
  }

  .how-cards h3 {
    margin-bottom: 4px;
  }

  .dialog-header .eyebrow {
    font-size: 7px;
  }

  dialog {
    padding: 18px 20px;
  }

  .button {
    font-size: 12px;
  }

  .site-footer p {
    font-size: 9px;
  }

  .contribute-section {
    padding-inline: 25px;
  }
}

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

  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
  }
}

[hidden] {
  display: none !important;
}

.hero-bottom {
  color: #e0e4da;
  text-shadow: 0 1px 3px #000;
}

.close-button {
  width: 44px;
  height: 44px;
}

.site-header .button {
  min-height: 44px;
}

.primary-filters {
  grid-template-columns: minmax(220px, 1fr) auto auto;
}

.ready-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 17px;
  font-size: 13px;
  color: #535b52;
}

.ready-toggle input {
  accent-color: var(--green);
  width: 17px;
  height: 17px;
}

.availability-note {
  color: #62685f;
  font-size: 13px;
  margin: 0 0 24px;
  max-width: 760px;
}

.game-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  background: #fcfcf8;
  transition:
    transform 0.18s,
    border-color 0.18s,
    box-shadow 0.18s;
  min-width: 0;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: #a8b59d;
  box-shadow: 0 12px 25px #2025220b;
}

.game-art {
  aspect-ratio: 1.5;
  padding: 22px;
  background: #eaece4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.game-cover {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 5px 6px #20252224);
}

.cover-placeholder {
  width: 100%;
  height: 100%;
  min-height: 100px;
  display: grid;
  place-items: center;
  background: #d8ddd1;
  color: #596650;
  font: 22px var(--mono);
  border-radius: 4px;
}

.game-card-copy {
  padding: 20px;
}

.game-card h3 {
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.35px;
  margin: 0 0 18px;
  min-height: 46px;
}

.game-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #62695f;
  font-size: 12px;
}

.game-card-meta span:first-child {
  font: 11px var(--mono);
}

.game-page {
  padding-top: 30px;
  padding-bottom: 90px;
  min-height: 65vh;
}

.back-link {
  font-size: 13px;
}

.game-intro {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 50px;
  align-items: center;
  padding: 45px 0 65px;
}

.game-page-art {
  background: #eaece4;
  padding: 24px;
  border-radius: 12px;
  aspect-ratio: 1.4;
}

.game-intro h1 {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: -2px;
  margin: 10px 0 16px;
}

.game-intro p:not(.eyebrow) {
  color: #62685f;
  margin-bottom: 24px;
}

.progress-heading {
  border-top: 1px solid var(--line);
  padding-top: 34px;
  margin-bottom: 26px;
  align-items: center;
}

.progress-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.progress-heading > span {
  font-size: 13px;
  color: #62685f;
}

.progress-list {
  display: grid;
  gap: 20px;
}

.progress-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfcf8;
  padding: 30px;
}

.progress-copy h3 {
  font-size: 26px;
  letter-spacing: -0.7px;
  margin: 0 0 8px;
}

.progress-copy p {
  max-width: 800px;
  margin: 0 0 12px;
}

.save-credit {
  font-size: 12px;
  color: #62685f;
}

.device-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.device-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
}

.device-button {
  min-height: 48px;
  text-align: center;
  white-space: normal;
}

.device-analogue3d-memory {
  background: #dfc071;
  color: #352a0e;
}

.device-analogue3d-memory:hover {
  background: #d4b25e;
}

.device-analogue3d-controller-pak {
  background: #356395;
  color: #fff;
}

.device-analogue3d-controller-pak:hover {
  background: #2a527e;
}

.device-summercart64 {
  background: #3c6251;
  color: #fff;
}

.device-summercart64:hover {
  background: #2e503f;
}

.device-option small {
  font-size: 11px;
  color: #62685f;
}

.install-button {
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 4px 0;
}

.save-advanced {
  font-size: 12px;
  color: #62685f;
  margin-top: 24px;
  border-top: 1px solid #e8e9e0;
  padding-top: 16px;
}

.save-advanced summary {
  cursor: pointer;
  width: fit-content;
}

.save-advanced p {
  overflow-wrap: anywhere;
}

#install-dialog {
  max-width: 630px;
  width: calc(100% - 32px);
  padding: 32px;
}

#install-title {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.8px;
}

.installation-steps {
  padding-left: 24px;
}

.installation-steps li {
  padding: 0 0 14px 7px;
}

.install-test-note {
  font-size: 12px;
  color: #62685f;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 780px) {
  .primary-filters {
    grid-template-columns: 1fr 1fr;
  }

  .primary-filters .search-box {
    grid-column: 1 / -1;
  }

  .game-card-copy {
    padding: 15px;
  }

  .game-card h3 {
    font-size: 15px;
    min-height: 42px;
  }

  .game-art {
    padding: 14px;
  }

  .game-intro {
    grid-template-columns: 160px 1fr;
    gap: 24px;
    padding: 32px 0 40px;
  }

  .game-intro h1 {
    font-size: 34px;
    letter-spacing: -1px;
  }

  .progress-card {
    padding: 24px;
  }

  .device-downloads {
    flex-direction: column;
  }

  .device-option,
  .device-option .device-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .game-intro {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .game-page-art {
    max-width: 240px;
  }

  .game-intro h1 {
    font-size: 36px;
  }

  .game-card h3 {
    font-size: 14px;
    min-height: 40px;
  }

  .game-card-meta {
    font-size: 11px;
    gap: 6px;
  }

  .game-card-copy {
    padding: 13px;
  }

  .game-art {
    padding: 12px;
  }

  .progress-heading {
    align-items: flex-start;
    gap: 10px;
  }
}

.primary-filters {
  display: grid;
}

.game-art {
  aspect-ratio: 1.4;
}

.game-cover {
  object-fit: contain;
  object-position: center;
}

.device-everdrive64 {
  background: #67528f;
  color: #fff;
}

.device-everdrive64:hover {
  background: #514074;
}

.archive-host-note {
  margin: 18px 0 0;
  color: #62685f;
  font-size: 12px;
}

/* Shared surfaces and semantic colors keep every page in the same theme. */
:root {
  color-scheme: light;
  --surface: #fcfcf8;
  --surface-muted: #eaece4;
  --input: #eeeee7;
  --muted: #62685f;
  --hero-ink: #202522;
  --hero-muted: #37443a;
  --hero-accent: #315b45;
  --hero-filter: invert(1) hue-rotate(180deg);
  --mem-bg: #f4e6b8;
  --mem-ink: #6c5014;
  --pak-bg: #e0ebf8;
  --pak-ink: #2d5580;
  --sc-bg: #e0eddf;
  --sc-ink: #315b45;
  --ed-bg: #e9e1f4;
  --ed-ink: #58417c;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #151917;
  --ink: #eff1e9;
  --muted: #abb5aa;
  --line: #374239;
  --surface: #1d241f;
  --surface-muted: #273029;
  --input: #242c26;
  --green: #a2c5ad;
  --hero-ink: #f6f5f0;
  --hero-muted: #d2d5ce;
  --hero-accent: #d5e7bb;
  --hero-filter: none;
  --mem-bg: #42391f;
  --mem-ink: #f0d488;
  --pak-bg: #24394f;
  --pak-ink: #a5cafa;
  --sc-bg: #293d30;
  --sc-ink: #b2d7b5;
  --ed-bg: #372c4b;
  --ed-ink: #d1bff3;
}
body {
  background: var(--paper);
  color: var(--ink);
}
.game-card,
.progress-card {
  background: var(--surface);
}
.game-art,
.game-page-art {
  background: var(--surface-muted);
}
.search-box {
  background: var(--input);
}
.search-box input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.game-card:hover {
  border-color: var(--green);
}
.cover-placeholder {
  background: var(--input);
  color: var(--muted);
}
.game-card-meta,
.availability-note,
.game-intro p:not(.eyebrow),
.progress-heading > span,
.save-credit,
.device-option small,
.save-advanced,
.install-test-note,
.archive-host-note {
  color: var(--muted);
}
.save-advanced {
  border-color: var(--line);
}
.contribute-section {
  background: var(--surface-muted);
}
.guide-symbol {
  border-color: var(--line);
  color: var(--green);
}
.close-button:hover {
  background: var(--surface-muted);
}
.button-dark:hover {
  background: var(--green);
  color: var(--paper);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.button:disabled:hover {
  transform: none;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: block;
  flex-shrink: 0;
  background: none;
  padding: 0;
  border-radius: 0;
}
.theme-toggle {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 8px;
  background: transparent;
  color: var(--ink);
}
.theme-toggle:hover {
  background: var(--surface-muted);
}
.theme-toggle svg {
  width: 100%;
  height: 100%;
}
.theme-sun,
[data-theme="dark"] .theme-moon {
  display: none;
}
[data-theme="dark"] .theme-sun {
  display: block;
}
.hero {
  color: var(--hero-ink);
}
.hero-image {
  filter: var(--hero-filter);
}
.hero .eyebrow.light,
.hero-description,
.hero-bottom {
  color: var(--hero-muted);
}
.hero h1 > span {
  color: var(--hero-accent);
}
.hero .live-dot {
  background: var(--hero-accent);
}
.hero-bottom {
  align-items: flex-end;
  text-shadow: none;
}
.hero-type-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.hero-type-counts .type-count {
  font-size: 10px;
}
.game-card {
  display: flex;
  flex-direction: column;
}
.game-art {
  flex-shrink: 0;
}
.game-card-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.game-card h3 {
  margin-bottom: 12px;
}
.game-card-meta {
  margin-bottom: 15px;
}
.region-tag {
  font: 10px var(--mono);
  color: var(--muted);
  letter-spacing: 0.3px;
}
.save-type-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}
.type-count {
  display: inline-flex;
  gap: 4px;
  align-items: baseline;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.6;
  padding: 3px 6px;
  border-radius: 4px;
  font-weight: 500;
}
.type-count b {
  font-weight: 750;
}
.type-analogue3d-memory {
  background: var(--mem-bg);
  color: var(--mem-ink);
}
.type-analogue3d-controller-pak {
  background: var(--pak-bg);
  color: var(--pak-ink);
}
.type-summercart64 {
  background: var(--sc-bg);
  color: var(--sc-ink);
}
.type-everdrive64 {
  background: var(--ed-bg);
  color: var(--ed-ink);
}
.type-count.is-empty {
  opacity: 0.65;
}
.hero-type-counts .type-count {
  background: #ffffffe0;
}
.hero-type-counts .type-analogue3d-memory {
  color: #6c5014;
}
.hero-type-counts .type-analogue3d-controller-pak {
  color: #2d5580;
}
.hero-type-counts .type-summercart64 {
  color: #315b45;
}
.hero-type-counts .type-everdrive64 {
  color: #58417c;
}
[data-theme="dark"] .hero-type-counts .type-count {
  background: #101912de;
}
[data-theme="dark"] .hero-type-counts .type-analogue3d-memory {
  color: #f0d488;
}
[data-theme="dark"] .hero-type-counts .type-analogue3d-controller-pak {
  color: #a5cafa;
}
[data-theme="dark"] .hero-type-counts .type-summercart64 {
  color: #b2d7b5;
}
[data-theme="dark"] .hero-type-counts .type-everdrive64 {
  color: #d1bff3;
}
@media (max-width: 780px) {
  .site-header {
    gap: 12px;
  }
  .site-header nav {
    gap: 10px;
  }
  .hero {
    padding-bottom: 105px;
  }
  .hero-bottom {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .hero-bottom p {
    max-width: none;
  }
  .hero-type-counts {
    justify-content: flex-start;
    width: 100%;
  }
}
@media (max-width: 430px) {
  .site-header .button .arrow-icon {
    display: none;
  }
  .site-header nav {
    gap: 8px;
  }
  .theme-toggle {
    width: 32px;
    height: 32px;
    padding: 7px;
  }
  .hero {
    min-height: 500px;
  }
  .hero-type-counts .type-count {
    font-size: 9px;
  }
  .game-card-meta {
    margin-bottom: 12px;
  }
  .type-count {
    font-size: 9px;
    padding: 3px 5px;
  }
}
@media (max-width: 360px) {
  .site-header .brand-light {
    display: none;
  }
}

.ready-toggle,
.contribute-section .eyebrow,
.contribute-section p:not(.eyebrow) {
  color: var(--muted);
}
.search-icon {
  border-color: var(--muted);
}
.search-icon::after {
  background: var(--muted);
}
.device-analogue3d-memory:disabled:hover {
  background: #dfc071;
}
@media (max-width: 430px) {
  .brand-mark {
    width: 28px;
    height: 28px;
  }
}

.hero .button-cream {
  background: var(--hero-ink);
  color: var(--paper);
}
.type-count {
  align-items: center;
  gap: 5px;
}
.type-count b {
  display: inline-block;
  min-width: 18px;
  padding: 1px 4px;
  border-radius: 3px;
  background: #202522;
  color: #fff;
  text-align: center;
  font-size: 10px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
[data-theme="dark"] .type-count b {
  background: #eff1e9;
  color: #151917;
}
.type-count.is-empty {
  opacity: 1;
}
.type-count.is-empty > span {
  opacity: 0.65;
}
@media (max-width: 780px) {
  .hero {
    padding-bottom: 130px;
  }
}
@media (max-width: 430px) {
  .type-count {
    gap: 4px;
    padding: 3px 4px;
  }
  .type-count b {
    min-width: 16px;
    padding-inline: 3px;
  }
}

/* Keep all four availability labels together, at readable card widths. */
.game-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}
.save-type-counts {
  flex-wrap: nowrap;
  gap: 2px;
}
.save-type-counts .type-count {
  font-size: 9px;
  gap: 2px;
  padding: 3px;
}
.save-type-counts .type-count b {
  font-size: 9px;
  min-width: 14px;
  padding: 1px 2px;
}
.button-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  object-fit: contain;
}
.device-downloads {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}
.device-option,
.device-option .device-button {
  width: 100%;
}
.device-button {
  justify-content: flex-start;
  gap: 4px;
  padding: 7px 10px 7px 2px;
  min-height: 72px;
  font-size: 12px;
  text-align: left;
}
.device-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
@media (max-width: 1000px) {
  .device-downloads {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .device-downloads {
    grid-template-columns: 1fr;
  }
}

/* Device labels are text, not the larger decorative arrow spans. */
.device-button > span {
  font-size: 12px;
  line-height: 1.35;
}
.device-analogue3d-controller-pak > span {
  font-size: 11px;
  letter-spacing: -0.1px;
  white-space: nowrap;
}
.device-downloads {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}
.device-flashcarts {
  background: linear-gradient(110deg, #3c6251 0%, #3c6251 44%, #67528f 100%);
  color: #fff;
}
.device-flashcarts:hover {
  filter: brightness(1.08);
}
.flashcart-icons {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0;
}
.flashcart-icons .button-icon {
  width: 44px;
  height: 48px;
  flex-basis: 44px;
}
.flashcart-instructions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.flashcart-instructions h3 {
  font-size: 15px;
}
.flashcart-instructions .device-button {
  padding-right: 8px;
}
@media (max-width: 620px) {
  .flashcart-instructions {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
/* Each progress variant reserves the same Memory, Pak and flashcart slots. */
.device-downloads {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.flashcart-alternatives {
  display: grid;
  gap: 10px;
}
.save-medium {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
}
.progress-copy .content-scope {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.report-save-link {
  margin-top: 20px;
  font-size: 12px;
  gap: 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 900px) {
  .device-downloads {
    grid-template-columns: 1fr;
  }
}

/* Platforms share the archive's surfaces; PlayStation uses compact pages. */
.platform-switch {
  display: flex;
  gap: 6px;
  padding-block: 0 20px;
}
.platform-switch a {
  padding: 9px 17px;
  border: 1px solid var(--line);
  border-radius: 30px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}
.platform-switch a[aria-current="page"] {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}
.device-memcard-pro,
.type-memcard-pro {
  background: #315e63;
  color: #fff;
}
.device-memcard-pro:hover {
  background: #274d52;
}
.memcard-pro-icon {
  width: 32px;
  height: 36px;
  flex: 0 0 32px;
}
.device-memcard-pro {
  gap: 12px;
}
.device-memcard-pro > span {
  font-size: 12px;
  line-height: 1.35;
}
.ps1-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  padding: 18px 0;
}
.ps1-settings label {
  display: grid;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
}
.ps1-settings select {
  min-width: 150px;
  padding: 10px 30px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
}
.ps1-settings p {
  margin: 0 0 6px;
  max-width: 340px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.ps1-collection-tools {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 20px;
}
.ps1-collection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.ps1-collection-actions small {
  font-size: 11px;
  color: var(--muted);
  max-width: 350px;
}
.game-grid.ps1-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ps1-game-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 14px;
  gap: 14px;
  align-items: center;
  padding: 10px;
}
.ps1-game-row .game-art {
  width: 70px;
  height: 70px;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 4px;
}
.ps1-game-row .game-card-copy {
  padding: 0;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 5px 10px;
}
.ps1-game-row h3 {
  flex: 1 0 100%;
  font-size: 14px;
  margin: 0;
  min-height: 0;
  line-height: 1.35;
}
.ps1-game-row .type-count {
  font-size: 10px;
  padding: 1px 5px;
}
.ps1-game-row .cover-placeholder {
  min-height: 0;
  width: 100%;
  height: 100%;
  font-size: 14px;
}
.row-arrow {
  color: var(--muted);
}
.ps1-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  font-size: 12px;
  margin-top: 24px;
}
.ps1-pagination button {
  min-width: 75px;
}
.ps1-page-art {
  aspect-ratio: 1;
  max-width: 260px;
}
.ps1-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}
.ps1-description,
.ps1-source-notes {
  white-space: pre-line;
}
.button-outline {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}
.source-warning {
  display: inline-block;
  margin-left: 12px;
  font-size: 10px;
  font-weight: 500;
  vertical-align: middle;
  border-radius: 4px;
  padding: 4px 8px;
  color: var(--mem-ink);
  background: var(--mem-bg);
}
#ps1-dialog {
  width: min(680px, calc(100vw - 32px));
}
#ps1-dialog h2 {
  margin: 0;
  font-size: 22px;
}
#ps1-dialog p,
#ps1-dialog li {
  font-size: 13px;
  line-height: 1.7;
}
#ps1-dialog code {
  overflow-wrap: anywhere;
}
.dialog-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 20px;
}
.conflict-list {
  max-height: 220px;
  overflow: auto;
  padding: 12px 12px 12px 28px;
  background: var(--surface-muted);
  border-radius: 4px;
}
@media (max-width: 780px) {
  .game-grid.ps1-list {
    grid-template-columns: 1fr;
  }
  .ps1-settings p {
    flex-basis: 100%;
    max-width: none;
  }
  .ps1-downloads .button {
    width: 100%;
  }
  .ps1-game-row h3 {
    min-height: 0;
  }
}
@media (max-width: 430px) {
  .platform-switch {
    padding-bottom: 12px;
  }
  .ps1-game-row {
    grid-template-columns: 56px minmax(0, 1fr) 10px;
    gap: 10px;
    padding: 9px;
  }
  .ps1-game-row .game-art {
    width: 56px;
    height: 56px;
  }
  .ps1-game-row h3 {
    font-size: 12px;
  }
  .ps1-settings {
    gap: 12px;
  }
  .ps1-settings label {
    flex: 1;
    min-width: 0;
  }
  .ps1-settings select {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding-right: 14px;
  }
  .ps1-pagination {
    gap: 12px;
  }
}

.hero-type-counts .type-memcard-pro {
  color: #315e63;
}
[data-theme="dark"] .hero-type-counts .type-memcard-pro {
  color: #b8e2dd;
}

.ps1-source-notes {
  overflow-wrap: anywhere;
}

/* A compact two-column welcome and controls panel brings the shelf above the fold. */
.site-header {
  height: 78px;
}
.platform-switch {
  padding-top: 0;
  padding-bottom: 16px;
}
.catalog-top {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
}
.catalog-top .hero {
  width: 100%;
  min-height: 270px;
  margin: 0;
  padding: 22px 24px 66px;
  border-radius: 10px;
}
.catalog-top .hero-image {
  background-position: 62% center;
}
.catalog-top .hero-copy {
  max-width: 100%;
}
.catalog-top .hero .eyebrow {
  font-size: 8px;
  margin: 0 0 12px;
}
.catalog-top .hero h1 {
  font-size: clamp(36px, 4vw, 54px);
  letter-spacing: -2.5px;
  line-height: 1;
  margin: 0 0 10px;
}
.catalog-top .hero h1 br {
  display: none;
}
.catalog-top .hero-description {
  font-size: 11px;
  max-width: 210px;
  margin: 0 0 10px;
}
.catalog-top .hero .button {
  min-height: 34px;
  padding: 6px 11px;
  font-size: 10px;
  gap: 14px;
}
.catalog-top .hero-bottom {
  left: 24px;
  right: 20px;
  bottom: 18px;
  gap: 0;
}
.catalog-top .hero-type-counts {
  justify-content: flex-start;
  gap: 5px;
}
.catalog-controls {
  min-width: 0;
}
.catalog-controls .section-heading {
  margin: 0 0 10px;
}
.catalog-controls .section-heading .eyebrow {
  display: none;
}
.catalog-controls h2 {
  font-size: 28px;
  letter-spacing: -1px;
}
.catalog-controls .section-note {
  display: none;
}
.catalog-controls .filters {
  padding: 12px 0;
}
.catalog-controls .primary-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.catalog-controls .search-box {
  grid-column: 1/-1;
  height: 40px;
}
.catalog-controls .select-wrap select {
  width: 100%;
  max-width: 100%;
  min-height: 36px;
  padding: 6px 9px;
  font-size: 11px;
}
.catalog-controls .ready-toggle {
  margin-top: 8px;
  font-size: 11px;
}
.catalog-controls .results-bar {
  min-height: 32px;
}
.catalog-controls .ps1-settings {
  padding: 0;
  gap: 8px;
}
.catalog-controls .ps1-settings label {
  gap: 3px;
}
.catalog-controls .ps1-settings select {
  min-width: 120px;
  padding: 6px 8px;
  font-size: 11px;
}
.catalog-controls .ps1-settings p {
  display: none;
}
.catalog-controls .ps1-collection-tools {
  padding: 8px 0;
  margin: 0;
  border-top: 0;
}
.catalog-controls .ps1-collection-actions {
  margin-top: 8px;
  gap: 8px 12px;
}
.catalog-controls .ps1-collection-actions .button {
  min-height: 34px;
  padding: 5px 10px;
  font-size: 10px;
}
.catalog-controls .ps1-collection-actions .memcard-pro-icon {
  width: 20px;
  height: 24px;
  flex-basis: 20px;
}
.catalog-controls .ps1-collection-actions small {
  display: none;
}
.catalog-controls .ps1-pagination {
  margin: 6px 0 0;
  gap: 18px;
  font-size: 11px;
}
.catalog-controls .ps1-pagination .text-button {
  padding: 4px 0;
}
.archive {
  padding-top: 24px;
}
.archive > .availability-note {
  font-size: 11px;
  margin-bottom: 12px;
}

/* The selected variant stays in one compact panel; long source notes scroll inside it. */
.game-page {
  padding-top: 8px;
  padding-bottom: 24px;
  min-height: 0;
}
.game-intro {
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  padding: 14px 0 18px;
}
.game-page-art {
  width: 150px;
  padding: 12px;
  aspect-ratio: 1.4;
}
.game-page-art.ps1-page-art {
  aspect-ratio: 1;
  width: 115px;
  justify-self: center;
}
.game-intro .eyebrow {
  margin-bottom: 5px;
}
.game-intro h1 {
  font-size: clamp(25px, 3vw, 39px);
  margin: 3px 0 7px;
  letter-spacing: -1.3px;
}
.game-intro p:not(.eyebrow) {
  margin: 0 0 9px;
  font-size: 12px;
}
.game-intro .button {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 11px;
}
.game-page .ps1-settings {
  padding: 6px 0 12px;
  gap: 10px;
}
.game-page .ps1-settings select {
  padding-block: 6px;
}
.progress-heading {
  padding-top: 12px;
  margin-bottom: 12px;
  gap: 12px;
}
.progress-heading h2 {
  font-size: 23px;
}
.save-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.save-tabs button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  padding: 7px 12px;
  font-size: 12px;
}
.save-tabs button[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.progress-card {
  padding: 18px 20px;
}
.progress-copy h3 {
  font-size: 21px;
  margin-bottom: 6px;
}
.progress-copy p {
  font-size: 13px;
  margin-bottom: 8px;
}
.progress-copy > p:not(.save-medium):not(.save-credit):not(.content-scope) {
  max-height: 180px;
  overflow: auto;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.device-downloads,
.ps1-downloads {
  margin-top: 12px;
  gap: 10px;
}
.device-option {
  gap: 4px;
}
.device-downloads .device-button {
  min-height: 64px;
}
.device-downloads .device-button > .button-icon {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}
.device-downloads .text-button {
  padding: 3px 0;
}
.sd-install-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.game-page .save-advanced {
  margin-top: 10px;
}
.game-page > .save-advanced {
  max-height: 180px;
  overflow: auto;
}
.report-save-link {
  margin-top: 12px;
}
.game-page #download-ps1-game {
  min-height: 34px;
  padding: 6px 14px;
  margin-top: 10px;
}
.game-page ~ .site-footer {
  min-height: 86px;
  margin-top: 8px;
  padding-top: 18px;
  padding-bottom: 18px;
}
#n64-sd-dialog {
  width: min(640px, calc(100vw - 28px));
}
#n64-sd-dialog h2 {
  font-size: 23px;
}
#n64-sd-dialog p {
  font-size: 13px;
}
.sd-field {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  font-size: 12px;
}
.sd-field select {
  width: 100%;
  min-width: 0;
  padding: 9px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.sd-check {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
  font-size: 12px;
}
.sd-destination {
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 11px !important;
}
@media (min-width: 1500px) {
  .game-page {
    max-width: 1250px;
  }
}
@media (max-width: 780px) {
  .catalog-top {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .catalog-top .hero {
    min-height: 192px;
    padding: 16px 18px 48px;
  }
  .catalog-top .hero h1 {
    font-size: 38px;
  }
  .catalog-top .hero-bottom {
    left: 18px;
    bottom: 12px;
  }
  .catalog-top .hero-description {
    margin-bottom: 7px;
  }
  .catalog-top .hero .eyebrow {
    margin-bottom: 9px;
  }
  .catalog-controls .primary-filters {
    flex-direction: row;
  }
  .game-intro {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 16px;
  }
  .game-page-art {
    width: 100px;
    padding: 8px;
  }
  .game-page-art.ps1-page-art {
    width: 85px;
  }
  .game-intro h1 {
    font-size: 25px;
  }
  .game-intro p:not(.eyebrow) {
    font-size: 11px;
  }
  .progress-card {
    padding: 14px;
  }
  .game-page .ps1-settings p {
    display: none;
  }
  .save-tabs {
    flex-wrap: nowrap;
    overflow: auto;
    padding-bottom: 4px;
  }
  .save-tabs button {
    white-space: nowrap;
  }
  .game-intro .button {
    font-size: 10px;
    padding: 6px 8px;
    gap: 10px;
  }
}

.catalog-top .hero h1 {
  font-size: 44px;
}
.catalog-top .hero h1 br {
  display: block;
}
@media (max-width: 780px) {
  .catalog-top .hero {
    min-height: 250px;
  }
  .catalog-top .hero h1 {
    font-size: 38px;
  }
}
body[data-platform="playstation"]
  .catalog-controls
  .select-wrap:has(#device-filter) {
  display: none;
}
body[data-platform="playstation"] .catalog-controls .primary-filters {
  grid-template-columns: minmax(0, 1fr) auto;
}
body[data-platform="playstation"] .catalog-controls .search-box {
  grid-column: auto;
  min-width: 0;
}
@media (max-width: 780px) {
  body[data-platform="playstation"] .catalog-top .hero {
    min-height: 220px;
  }
}

/* Platform identity: warm green Nintendo surfaces, cool blue PlayStation surfaces. */
:root[data-platform="playstation"] {
  --paper: #f0f4fa;
  --ink: #23324a;
  --muted: #586d87;
  --line: #d1dceb;
  --surface: #fafcff;
  --surface-muted: #e4ecf7;
  --input: #e5edf8;
  --green: #486eaa;
  --lime: #d8e6ff;
  --platform-accent: #416ba8;
  --hero-ink: #223858;
  --hero-muted: #385477;
  --hero-accent: #3b5f96;
}
:root[data-platform="playstation"][data-theme="dark"] {
  --paper: #141c29;
  --ink: #edf3ff;
  --muted: #a9bad3;
  --line: #344660;
  --surface: #1d293b;
  --surface-muted: #26364d;
  --input: #24334a;
  --green: #9ebde9;
  --lime: #c8ddff;
  --platform-accent: #527cb5;
  --hero-ink: #edf3ff;
  --hero-muted: #c4d2e8;
  --hero-accent: #b8d5ff;
}
:root[data-platform="playstation"] .platform-switch a[aria-current="page"] {
  background: var(--platform-accent);
  border-color: var(--platform-accent);
  color: #fff;
}
:root[data-platform="playstation"] .device-memcard-pro {
  background: #3e659a;
  color: #fff;
}
:root[data-platform="playstation"] .device-memcard-pro:hover {
  background: #32517c;
}
:root[data-platform="playstation"] .type-memcard-pro {
  background: #dce8fa;
  color: #2e5282;
}
:root[data-platform="playstation"][data-theme="dark"] .type-memcard-pro {
  background: #2b456b;
  color: #d5e5ff;
}
:root[data-platform="playstation"] :is(button, a, input, select):focus-visible {
  outline-color: var(--platform-accent);
}

.progress-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}
.progress-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 650;
  border-radius: 5px;
}
.progress-heading-icon {
  display: flex;
  align-items: center;
  gap: 8px;
}
.progress-badge svg,
.progress-heading-icon svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.progress-heading-icon svg {
  width: 22px;
  height: 22px;
}
.badge-unlocks {
  background: var(--mem-bg);
  color: var(--mem-ink);
}
.badge-final {
  background: var(--pak-bg);
  color: var(--pak-ink);
}
.badge-complete {
  background: var(--sc-bg);
  color: var(--sc-ink);
}
.progress-heading-icon {
  background: transparent;
  color: var(--ink);
}
.progress-heading-icon.badge-unlocks svg {
  color: var(--mem-ink);
}
.progress-heading-icon.badge-final svg {
  color: var(--pak-ink);
}
.progress-heading-icon.badge-complete svg {
  color: var(--sc-ink);
}
.memory-invite {
  color: var(--muted);
  font-size: 13px;
  margin: 16px 0 0;
}
.memory-invite a {
  color: var(--ink);
  font-weight: 650;
}
.description-scope {
  font-weight: 650;
}
@media (prefers-reduced-motion: no-preference) {
  .progress-card[role="tabpanel"]:not([hidden]),
  dialog[open] {
    animation: reveal-panel 160ms ease-out both;
  }
  @keyframes reveal-panel {
    from {
      opacity: 0;
      transform: translateY(4px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
