:root {
  color-scheme: light;
  --page: #f2f3f5;
  --surface: #fff;
  --text: #292c32;
  --muted: #656b75;
  --line: #e0e3e8;
  --control: #f7f8fa;
  --focus: #3864ad;
  --shadow: 0 2px 5px #19243a08;
}
:root.dark-mode {
  color-scheme: dark;
  --page: #131416;
  --surface: #1d1f22;
  --text: #eceef2;
  --muted: #a5abb5;
  --line: #34373d;
  --control: #25282d;
  --focus: #9abcf6;
  --shadow: 0 2px 5px #0002;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font:
    16px/1.55 Arial,
    sans-serif;
  min-height: 100vh;
}
a {
  color: inherit;
}
button,
select {
  font: inherit;
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 10;
  top: 8px;
  left: 16px;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--surface);
  transform: translateY(-150%);
}
.skip-link:focus {
  transform: translateY(0);
}
.container {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding-block: 12px;
  text-decoration: none;
}
.brand img {
  width: 23px;
  height: 23px;
  flex-shrink: 0;
}
.brand h1 {
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.3px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#dynamic-title {
  unicode-bidi: isolate;
}
#dynamic-title::after {
  content: "";
  display: inline-block;
  height: 0.85em;
  width: 1px;
  margin-left: 4px;
  background: currentColor;
  vertical-align: -0.04em;
  opacity: 0.5;
}
.dark-mode-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  transition:
    background 0.18s,
    border-color 0.18s;
}
.dark-mode-toggle:hover {
  background: var(--control);
  border-color: var(--line);
}
.dark-mode-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sun-icon,
.dark-mode .moon-icon {
  display: none;
}
.dark-mode .sun-icon {
  display: block;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 20px;
  margin: 28px 0 0;
}
.game-item {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9px;
  box-shadow: var(--shadow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.game-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  outline-offset: -3px;
}
.game-link:focus-visible {
  outline-offset: -3px;
  border-radius: 8px;
}
.thumbnail {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--control);
  border-bottom: 1px solid var(--line);
}
.thumbnail img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.thumbnail-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
}
.game-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 13px 9px;
}
.game-title {
  flex: 1;
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -0.15px;
}
.open-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 4px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}
.game-info {
  padding: 0 13px 13px;
}
.version-select,
.model-name {
  width: 100%;
  min-height: 40px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 9px;
  background: var(--control);
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}
.version-select {
  cursor: pointer;
}
.model-name {
  color: var(--muted);
  display: flex;
  align-items: center;
  border-color: transparent;
}
.version-fallback {
  font-size: 13px;
  padding-left: 18px;
}
.version-fallback li {
  margin-top: 8px;
}
.about-section {
  margin-top: 32px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow);
}
.about-section h2 {
  margin: 0 0 12px;
  font-size: 19px;
  letter-spacing: -0.3px;
}
.about-section p {
  color: var(--muted);
  max-width: 82ch;
  margin: 0;
  line-height: 1.7;
}
.about-section p + p {
  margin-top: 9px;
}
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: 20px;
  row-gap: 6px;
  margin-top: 20px;
  padding: 8px 0 22px;
  color: var(--muted);
  font-size: 12px;
}
.site-footer p {
  margin: 0;
}
.jam-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  text-decoration: none;
  color: var(--muted);
}
.jam-link:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media (hover: hover) and (pointer: fine) {
  .game-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px #17243a12;
    border-color: #acb5c3;
  }
  .dark-mode .game-item:hover {
    box-shadow: 0 6px 18px #0004;
    border-color: #616975;
  }
  .game-link:hover .thumbnail img {
    transform: scale(1.025);
  }
  .game-link:hover .open-icon {
    transform: translate(1px, -1px);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .game-item {
    animation: arrive 0.38s ease both;
    animation-delay: calc(var(--order, 0) * 35ms);
  }
  @keyframes arrive {
    from {
      opacity: 0;
      translate: 0 5px;
    }
    to {
      opacity: 1;
      translate: 0 0;
    }
  }
  .spin-animation {
    animation: spin 0.45s ease-in-out;
  }
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
}
@media (max-width: 600px) {
  .container {
    width: calc(100% - 28px);
  }
  .header-inner {
    min-height: 58px;
    gap: 12px;
  }
  .brand h1 {
    font-size: 18px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
  }
  .game-title-row {
    padding: 11px 10px 8px;
    gap: 5px;
  }
  .game-title {
    font-size: 15px;
  }
  .open-icon {
    width: 12px;
    height: 12px;
    margin-top: 4px;
  }
  .game-info {
    padding: 0 9px 10px;
  }
  .version-select,
  .model-name {
    min-height: 44px;
    font-size: 12px;
    padding: 8px 5px;
  }
  .about-section {
    padding: 20px;
    margin-top: 24px;
  }
  .about-section h2 {
    font-size: 18px;
  }
  .site-footer {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}
@media (max-width: 359px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .game-title {
    font-size: 16px;
  }
  .version-select,
  .model-name {
    font-size: 14px;
  }
  .game-title-row,
  .game-info {
    padding-inline: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  #dynamic-title::after {
    display: none;
  }
}
