@charset "UTF-8";

:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #28372d;
  background: #f5f3eb;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
a, button { touch-action: manipulation; }
:focus-visible { outline: 3px solid #82521f; outline-offset: 5px; }

.shell {
  width: min(100% - clamp(32px, 10vw, 120px), 1060px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  min-height: clamp(62px, 9vw, 88px);
  border-bottom: 1px solid #d9ddd1;
}

.site-home {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  letter-spacing: .045em;
}
.site-home:hover { text-decoration: underline; text-underline-offset: 4px; }

main { padding-block: clamp(30px, 6vw, 68px) 58px; }
h1 {
  margin-bottom: clamp(24px, 5vw, 42px);
  font-size: clamp(2.3rem, 6.4vw, 4.25rem);
  line-height: 1.12;
  font-weight: 800;
}

.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19.5rem), 1fr));
  gap: clamp(18px, 3vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid #d9ddd1;
  border-radius: 20px;
  background: #fdfdf8;
  box-shadow: 0 10px 30px #28372d0d;
}
.game-card:hover .game-launch { background-color: #223f31; }

.game-cover {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: #e2e7d6;
}

.game-details {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: clamp(20px, 4.2vw, 42px);
}

.game-details h2 {
  font-size: clamp(1.6rem, 4.4vw, 2.55rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.game-details p {
  color: #536052;
  font-size: 1rem;
  line-height: 1.65;
}

.game-launch,
#catalog-retry {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 19px;
  border: 0;
  border-radius: 9px;
  background: #365543;
  color: #fff;
  font: inherit;
  font-weight: 650;
}
.game-launch { margin-top: auto; }

#catalog-status { margin-bottom: 16px; }
#catalog-retry { cursor: pointer; }

@media (min-width: 720px) {
  .games > li:only-child .game-card {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
  }
  .games > li:only-child .game-cover {
    height: 100%;
    max-height: 430px;
  }
  .games > li:only-child .game-details {
    justify-content: center;
  }
  .games > li:only-child .game-launch { margin-top: 12px; }
  .games > li:only-child .game-card:not(:has(.game-cover)) { grid-template-columns: 1fr; }
}
