.shelf-home {
  --shelf-ink: #482d1c;
  --shelf-paper: #fdf3e1;
  --shelf-line: #e8d3ac;
  --shelf-olive: #506331;
  background: var(--shelf-paper);
  color: var(--shelf-ink);
}

.shelf-home main {
  background: none;
}

.shelf-home .topbar .wrap,
.game-shelf {
  width: min(95%, 1440px);
  margin-inline: auto;
}

.shelf-home .topbar .wrap {
  min-height: clamp(74px, 6.7vw, 100px);
  padding-inline: clamp(0px, 2vw, 30px);
}

.shelf-home .topbar .brand img {
  width: clamp(140px, 14vw, 208px);
  height: auto;
}

.shelf-home .topbar nav {
  font-size: clamp(15px, 1.45vw, 22px);
  gap: clamp(20px, 3.5vw, 52px);
}

.shelf-home .topbar nav a {
  position: relative;
  color: var(--shelf-ink);
}

.shelf-home .topbar nav a[aria-current] {
  color: var(--shelf-ink);
  font-weight: 750;
}

.shelf-home .topbar nav a[aria-current]::after {
  position: absolute;
  inset: auto 0 -10px;
  height: 4px;
  border-radius: 4px;
  background: var(--shelf-olive);
  content: "";
}

.game-shelf {
  padding-block: clamp(25px, 2.5vw, 38px) clamp(18px, 1.8vw, 28px);
  scroll-margin-top: 120px;
}

.game-shelf h1,
.game-panel h2,
.tile-name {
  margin: 0;
  color: var(--shelf-ink);
  font-family: Baloo, Nunito, system-ui, sans-serif;
  font-weight: 750;
  line-height: 1.06;
  letter-spacing: -.035em;
}

.game-shelf h1 {
  margin-bottom: clamp(20px, 2.1vw, 32px);
  font-size: clamp(30px, 4vw, 60px);
  text-align: center;
}

.game-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.15vw, 18px) clamp(10px, 1.55vw, 24px);
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.shelf-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.game-tile {
  display: flex;
  position: relative;
  align-items: center;
  gap: clamp(10px, 1.45vw, 23px);
  min-width: 0;
  min-height: clamp(92px, 8.65vw, 132px);
  padding: clamp(10px, 1.05vw, 16px);
  border: 1px solid var(--shelf-line);
  border-radius: clamp(16px, 1.9vw, 28px);
  background: #fff7e9;
  cursor: pointer;
}

.game-tile:hover {
  border-color: var(--shelf-olive);
}

.game-picker input:checked + .game-tile {
  border-color: var(--shelf-olive);
  box-shadow: inset 0 0 0 2px var(--shelf-olive);
}

.game-picker input:checked + .game-tile::after {
  position: absolute;
  inset: auto 31% -3px;
  height: 7px;
  border-radius: 10px;
  background: var(--shelf-olive);
  content: "";
}

.game-picker input:focus-visible + .game-tile {
  outline: 3px solid var(--shelf-olive);
  outline-offset: 4px;
}

.game-tile img {
  flex: 0 0 auto;
  width: clamp(56px, 6.6vw, 100px);
  height: clamp(56px, 6.6vw, 100px);
  object-fit: cover;
  border-radius: 21%;
}

.game-tile-preview {
  object-position: center 27%;
}

.game-tile img.game-tile-art {
  object-fit: contain;
  background: #e5edcf;
}

.tile-name {
  font-size: clamp(19px, 2.05vw, 31px);
}

.tile-subtitle {
  display: block;
  margin-top: .14em;
  font-size: .72em;
}

.tile-name small {
  display: table;
  margin-top: .65em;
  padding: .37em .7em;
  border: 1px solid #ebd4ae;
  border-radius: 999px;
  background: #f5e3c8;
  font: 650 clamp(12px, 1.22vw, 18px)/1.2 Nunito, system-ui, sans-serif;
  letter-spacing: 0;
}

.game-panel {
  display: none;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 37fr) minmax(0, 63fr);
  align-items: center;
  gap: clamp(20px, 2.6vw, 40px);
  min-width: 0;
  margin-top: clamp(2px, .45vw, 7px);
  padding: clamp(18px, 1.9vw, 29px);
  border: 1px solid var(--shelf-line);
  border-radius: clamp(18px, 1.85vw, 28px);
  background: #fff8e9;
  box-shadow: 0 2px 3px #6744120f;
}

#pick-capivaradoku:checked ~ #show-capivaradoku,
#pick-popludika:checked ~ #show-popludika,
#pick-mente:checked ~ #show-mente,
#pick-rift:checked ~ #show-rift,
#pick-linkrace:checked ~ #show-linkrace,
#pick-telaquest:checked ~ #show-telaquest,
#pick-joias:checked ~ #show-joias,
#pick-florescer:checked ~ #show-florescer {
  display: grid;
}

.game-summary {
  padding-inline-start: clamp(0px, 1.45vw, 22px);
}

.game-panel h2 {
  font-size: clamp(31px, 4.45vw, 68px);
}

.game-summary p {
  max-width: 31ch;
  margin: .65em 0 1.35em;
  font-size: clamp(16px, 1.73vw, 25px);
  line-height: 1.38;
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.game-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 50px;
  padding: .68em 1em;
  border-radius: clamp(13px, 1.25vw, 19px);
  background: var(--shelf-olive);
  color: #fffaf0;
  font-size: clamp(16px, 1.83vw, 27px);
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

.game-primary:hover {
  background: #3e4e25;
  color: #fffaf0;
}

.game-primary img {
  width: 1.25em;
  height: 1.25em;
}

.game-more {
  color: #47582b;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.game-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: clamp(6px, 1.45vw, 22px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-photos a,
.game-photos img {
  display: block;
  border-radius: clamp(8px, 1.15vw, 17px);
}

.game-photos img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  box-shadow: 0 2px 5px #3a251e28;
}

.game-photos--single {
  grid-template-columns: minmax(0, clamp(154px, 17vw, 258px));
  justify-content: center;
}

.game-primary:focus-visible,
.game-more:focus-visible,
.game-photos a:focus-visible {
  outline: 3px solid var(--shelf-olive);
  outline-offset: 3px;
}

@media (min-width: 1040px) {
  .game-shelf {
    padding-block-start: 28px;
  }

  .game-shelf h1 {
    margin-bottom: 24px;
  }

  .game-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .game-tile {
    gap: clamp(10px, 1.15vw, 18px);
    min-height: clamp(98px, 8vw, 122px);
  }

  .game-tile img {
    width: clamp(62px, 5.8vw, 88px);
    height: clamp(62px, 5.8vw, 88px);
  }

  .tile-name {
    font-size: clamp(20px, 1.85vw, 28px);
  }

  .tile-name small {
    margin-top: .45em;
    font-size: clamp(12px, 1.08vw, 15px);
  }

  .game-summary {
    align-self: start;
    padding-block-start: clamp(18px, 3.2vw, 48px);
  }
}

@media (max-width: 800px) {
  .game-tile {
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
  }

  .tile-name {
    font-size: clamp(14px, 3.2vw, 24px);
    line-height: 1;
  }

  .tile-name small {
    margin-inline: auto;
  }

  .game-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .game-summary {
    padding-inline-start: 0;
  }

  .game-summary p {
    max-width: none;
    margin-bottom: 1em;
  }
}

@media (max-width: 550px) {
  .game-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-tile {
    flex-direction: row;
    justify-content: flex-start;
    min-height: 70px;
    text-align: left;
  }

  .game-tile img {
    width: clamp(40px, 11vw, 55px);
    height: clamp(40px, 11vw, 55px);
  }

  .tile-name small {
    margin-inline: 0;
  }
}

@media (max-width: 480px) {
  .shelf-home .topbar .wrap {
    justify-content: center;
    gap: 6px;
    padding: 9px 0 13px;
  }

  .shelf-home .topbar nav {
    width: auto;
    gap: 22px;
  }

  .shelf-home .topbar nav a[aria-current]::after {
    bottom: -5px;
    height: 3px;
  }

  .game-tile {
    gap: 8px;
    padding: 9px 5px 12px;
  }

  .tile-name {
    max-width: 100%;
    font-size: clamp(12px, 3.55vw, 16px);
    overflow-wrap: anywhere;
  }

  .tile-name small {
    padding-inline: .38em;
    font-size: clamp(10px, 2.75vw, 11px);
  }
}
