:root {
  --green: #3f965f;
  --green-light: #55ad70;
  --green-dark: #2f7e4f;
  --outline: #8a938c;
  --side-shadow: rgba(51, 68, 59, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #ffffff;
  font-family: "Gill Sans", "Avenir Next", "Trebuchet MS", sans-serif;
  color: #26372c;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-canvas {
  min-height: 100vh;
  position: relative;
  background: #ffffff;
  padding: 2.18cm 0.62cm 1.2cm;
}

h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-header {
  position: absolute;
  top: 0.62cm;
  left: 0.62cm;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.48cm;
}

.logo-link,
.bubli-wordmark {
  height: 1cm;
}

.logo-link {
  display: block;
}

.bubli-wordmark {
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.16cm;
}

.site-nav a {
  min-height: 0.72cm;
  display: inline-flex;
  align-items: center;
  padding: 0.09cm 0.18cm;
  color: var(--green-dark);
  background: #ffffff;
  border: 1px solid rgba(138, 147, 140, 0.6);
  border-radius: 8px;
  box-shadow: 0.045cm 0.035cm 0 rgba(51, 68, 59, 0.12);
  font-size: 0.39cm;
  font-weight: 800;
  line-height: 1;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--green);
  border-color: var(--green);
  outline: none;
}

.mountain-search {
  position: relative;
  width: min(100%, 1180px);
  min-height: 380px;
  overflow: hidden;
  border-radius: 8px;
  background: #e7f2fb;
  box-shadow: 0 18px 54px rgba(35, 52, 42, 0.14);
}

.mountain-image {
  width: 100%;
  height: min(64vh, 600px);
  min-height: 380px;
  display: block;
  object-fit: cover;
  object-position: center 52%;
}

.search-panel {
  position: absolute;
  top: clamp(24px, 7vw, 76px);
  left: 50%;
  width: min(calc(100% - 32px), 560px);
  transform: translateX(-50%);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 8px 8px 8px 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.98);
  border-radius: 999px;
  box-shadow: 0 14px 38px rgba(18, 35, 30, 0.24);
  backdrop-filter: blur(10px);
}

.search-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: #68756d;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1e3328;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
}

.search-field input::placeholder {
  color: #6d7b72;
}

.search-field button {
  min-height: 38px;
  border: 1px solid rgba(47, 126, 79, 0.4);
  border-radius: 999px;
  padding: 0 17px;
  background: var(--green);
  color: #ffffff;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
}

.search-results {
  margin: 10px auto 0;
  padding: 8px;
  list-style: none;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(138, 147, 140, 0.38);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(18, 35, 30, 0.18);
}

.search-results[hidden] {
  display: none;
}

.search-results a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: #26372c;
  font-weight: 800;
}

.search-results a:hover,
.search-results a:focus-visible {
  background: #e8f4ec;
  outline: none;
}

.search-status {
  min-height: 1.2em;
  margin: 8px 18px 0;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.34);
}

.shop-anchor {
  height: 1px;
}

.games-canvas {
  display: grid;
  align-content: start;
  gap: 28px;
}

.games-hero {
  max-width: 780px;
}

.games-hero h1 {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  color: var(--green-dark);
  font-size: clamp(2.25rem, 7vw, 5.2rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.games-hero p {
  max-width: 42rem;
  margin: 12px 0 0;
  color: #637268;
  font-size: clamp(1rem, 2vw, 1.28rem);
  font-weight: 700;
  line-height: 1.45;
}

.games-grid {
  width: min(100%, 1040px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  min-height: 340px;
  display: grid;
  grid-template-rows: minmax(210px, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(138, 147, 140, 0.46);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 42px rgba(35, 52, 42, 0.12);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.game-card:hover,
.game-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--green);
  box-shadow: 0 20px 52px rgba(35, 52, 42, 0.18);
  outline: none;
}

.game-card-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 210px;
  overflow: hidden;
  background: linear-gradient(180deg, #eff8f2, #dcefe4);
}

.game-card-falcon .game-card-art {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)),
    radial-gradient(circle at 62% 22%, rgba(85, 207, 255, 0.34), transparent 11rem),
    linear-gradient(180deg, #9ed6f1 0%, #e7f3ef 48%, #7da36b 100%);
}

.game-card-falcon .game-card-art::before,
.game-card-falcon .game-card-art::after {
  content: "";
  position: absolute;
  inset: auto -8% 0;
  height: 58%;
  clip-path: polygon(0 100%, 12% 54%, 22% 71%, 36% 31%, 49% 67%, 61% 28%, 75% 73%, 88% 44%, 100% 100%);
}

.game-card-falcon .game-card-art::before {
  background: #d7dee1;
}

.game-card-falcon .game-card-art::after {
  height: 45%;
  background: #8f9a91;
  transform: translateY(12%);
}

.game-card-art img {
  position: relative;
  z-index: 1;
  width: min(72%, 320px);
  max-height: 205px;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(28, 42, 34, 0.24));
}

.snake-board-preview {
  width: min(72%, 260px);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 12px;
  border-radius: 8px;
  background: #1e3328;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.snake-board-preview span {
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
}

.snake-board-preview span:nth-child(7),
.snake-board-preview span:nth-child(8),
.snake-board-preview span:nth-child(9),
.snake-board-preview span:nth-child(14) {
  background: var(--green-light);
  box-shadow: inset 0 -3px 0 rgba(47, 126, 79, 0.55);
}

.snake-board-preview span:nth-child(19) {
  background: #f0c95a;
}

.game-card-copy {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.game-card-copy strong {
  color: var(--green-dark);
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  line-height: 1;
}

.game-card-copy span {
  color: #5f7066;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

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

@media (max-width: 520px) {
  .site-header {
    top: 0.45cm;
    left: 0.45cm;
    gap: 0.24cm;
  }

  .site-canvas {
    padding: 2cm 0.45cm 1cm;
  }

  .site-nav {
    gap: 0.1cm;
  }

  .site-nav a {
    min-height: 0.62cm;
    padding: 0.08cm 0.13cm;
    font-size: 0.33cm;
  }

  .mountain-search {
    min-height: 430px;
  }

  .mountain-image {
    height: 430px;
    min-height: 430px;
  }

  .search-panel {
    top: 24px;
    width: calc(100% - 26px);
  }

  .search-field {
    min-height: 50px;
    gap: 10px;
    padding-left: 15px;
  }

  .search-field button {
    padding: 0 13px;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    min-height: 290px;
  }
}
