* { box-sizing: border-box; }
:root {
  --saffron: #ffcf6b;
  --peach: #ffb17a;
  --rose: #e9829c;
  --maroon: #5a1a2e;
  --ink: #3a1220;
  --card: #fffaf2;
  --tibetan-font: "Noto Serif Tibetan", Kailasa, Kokonor, "Microsoft Himalaya", "Jomolhari", serif;
}
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Fredoka, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: linear-gradient(165deg, #fff1c9 0%, var(--saffron) 30%, var(--peach) 62%, var(--rose) 100%);
  background-attachment: fixed;
  padding: 0 16px;
  position: relative;
  overflow-x: hidden;
}
[lang="bo"] { font-family: var(--tibetan-font); }

/* ---------- scattered Tibetan letters ---------- */
.letters { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.letters span {
  --rot: 0deg;
  position: absolute;
  font-family: var(--tibetan-font);
  font-weight: 700;
  color: var(--maroon);
  line-height: 1;
  transform: translate(-50%, -50%) rotate(var(--rot));
  animation: drift 14s ease-in-out infinite;
  will-change: transform;
}
@keyframes drift {
  0%, 100% { transform: translate(-50%, -50%) rotate(var(--rot)); }
  50% { transform: translate(-50%, calc(-50% - 26px)) rotate(calc(var(--rot) + 4deg)); }
}

/* ---------- hero ---------- */
.hero { position: relative; z-index: 1; text-align: center; padding: 44px 0 22px; }
.tibetan-title {
  margin: 0;
  font-size: clamp(30px, 6vw, 54px);
  font-weight: 700;
  color: var(--maroon);
  line-height: 1.5;
  text-shadow: 0 3px 0 rgba(255,255,255,.6);
}
.hero h1 {
  margin: 0;
  font-size: clamp(34px, 6.5vw, 60px);
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--maroon);
  text-shadow: 0 4px 0 rgba(255,255,255,.65), 0 12px 30px rgba(90,26,46,.18);
}
.wave { display: inline-block; animation: wave 2.2s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
.tagline { margin: 10px 0 0; font-size: 20px; line-height: 1.4; opacity: .85; }
.tagline [lang="bo"] { font-weight: 700; color: var(--maroon); line-height: 1; }

/* ---------- game cards ---------- */
main { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; padding-bottom: 40px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.card {
  --accent: #54a0ff;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 26px;
  border: 4px solid rgba(90,26,46,.1);
  box-shadow: 0 10px 0 rgba(90,26,46,.12), 0 20px 40px rgba(90,26,46,.16);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover, .card:focus-visible { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 16px 0 rgba(90,26,46,.12), 0 28px 50px rgba(90,26,46,.22); }
.card:active { transform: translateY(2px); }
.tile {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 65%, #fff), var(--accent));
}
.tile .emoji { font-size: 84px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.2)); transition: transform .2s ease; }
.card:hover .tile .emoji { transform: scale(1.12) rotate(-6deg); }
.info { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; }
.title { margin: 0; font-size: 26px; font-weight: 700; color: var(--maroon); }
.desc { margin: 0; opacity: .78; font-size: 16px; line-height: 1.35; }
.play {
  margin-top: 10px;
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(0,0,0,.15);
}

footer { position: relative; z-index: 1; text-align: center; padding: 20px 0 40px; opacity: .8; color: var(--maroon); }
footer [lang="bo"] { font-size: 18px; margin-left: 6px; }
