:root {
  --ink: #27243a;
  --muted: #6f6a7c;
  --paper: #fffaf2;
  --cream: #fff3d9;
  --orange: #ff7a59;
  --yellow: #ffc84d;
  --shadow: 0 22px 60px rgba(75, 57, 34, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 9%, rgba(255, 211, 105, 0.28), transparent 24rem),
    radial-gradient(circle at 92% 35%, rgba(151, 218, 255, 0.25), transparent 26rem),
    var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.cloud {
  position: absolute;
  width: 150px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  filter: blur(0.2px);
}

.cloud::before,
.cloud::after {
  position: absolute;
  bottom: 8px;
  content: "";
  border-radius: 50%;
  background: inherit;
}

.cloud::before {
  left: 22px;
  width: 58px;
  height: 58px;
}

.cloud::after {
  right: 24px;
  width: 76px;
  height: 76px;
}

.cloud-one {
  top: 11%;
  left: -48px;
}

.cloud-two {
  top: 22%;
  right: -64px;
  transform: scale(0.78);
}

.star {
  position: absolute;
  color: #ffbc35;
  font-size: 24px;
  animation: twinkle 2.6s ease-in-out infinite alternate;
}

.star-one { top: 18%; left: 7%; }
.star-two { top: 7%; right: 12%; animation-delay: -1.2s; }
.star-three { top: 39%; right: 5%; animation-delay: -0.5s; }

main {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 520px;
  padding: 34px 2px 82px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 13px 13px 18px 12px;
  color: #fff;
  background: var(--orange);
  box-shadow: 3px 4px 0 var(--ink);
  transform: rotate(-5deg);
}

.hero-copy {
  max-width: 760px;
  padding-top: 64px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #948b77;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 26px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

h1 em {
  color: var(--orange);
  font-style: normal;
}

.intro {
  max-width: 590px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

.hero-sticker {
  position: absolute;
  right: 5%;
  bottom: 54px;
  width: 154px;
  height: 154px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 42% 58% 50% 46%;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 10px 12px 0 rgba(39, 36, 58, 0.95);
  transform: rotate(8deg);
}

.sticker-face {
  font-size: 31px;
  font-weight: 900;
}

.sticker-pencil {
  position: absolute;
  top: -26px;
  right: 9px;
  font-size: 60px;
  transform: rotate(-12deg);
}

.library {
  padding: 76px 64px 62px;
  border: 2px solid rgba(39, 36, 58, 0.08);
  border-radius: 44px 44px 24px 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.section-heading {
  margin-bottom: 34px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 45px);
  letter-spacing: -0.04em;
}

.game-count {
  padding: 8px 14px;
  border-radius: 999px;
  color: #6b5a32;
  background: #fff1c4;
  font-size: 13px;
  font-weight: 800;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.game-card {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--ink);
  border-radius: 30px 30px 24px 24px;
  color: var(--ink);
  background: var(--card-start);
  box-shadow: 7px 8px 0 var(--ink);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.game-card:hover,
.game-card:focus-visible {
  outline: none;
  box-shadow: 12px 14px 0 var(--ink);
  transform: translate(-4px, -6px) rotate(-0.4deg);
}

.game-visual {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-bottom: 2px solid var(--ink);
  background:
    radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.5) 0 4px, transparent 5px),
    radial-gradient(circle at 78% 32%, rgba(255, 255, 255, 0.45) 0 6px, transparent 7px),
    linear-gradient(145deg, var(--card-start), var(--card-end));
}

.game-visual::before,
.game-visual::after {
  position: absolute;
  content: "";
  border: 2px solid rgba(39, 36, 58, 0.72);
  border-radius: 50%;
}

.game-visual::before {
  top: -52px;
  right: -38px;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.16);
}

.game-visual::after {
  bottom: -60px;
  left: -30px;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.1);
}

.game-emoji {
  position: relative;
  z-index: 1;
  width: 142px;
  height: 142px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 42% 58% 52% 48%;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 8px 9px 0 rgba(39, 36, 58, 0.92);
  font-size: 72px;
  transform: rotate(-5deg);
}

.game-tag {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  padding: 7px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 800;
}

.game-info {
  flex: 1;
  padding: 24px 26px 26px;
  display: flex;
  flex-direction: column;
  background: #fffdf8;
}

.game-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.game-info h3 {
  margin: 0 0 9px;
  font-size: clamp(23px, 3vw, 30px);
  line-height: 1.3;
}

.game-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.play-arrow {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--card-start);
  font-size: 21px;
  font-weight: 900;
  transition: transform 180ms ease;
}

.game-card:hover .play-arrow {
  transform: translateX(4px);
}

.game-meta {
  margin-top: auto;
  padding-top: 18px;
  color: #8e8797;
  font-size: 12px;
  font-weight: 700;
}

.empty-state {
  padding: 44px;
  border: 2px dashed #bbb3a5;
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
}

footer {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #8e877a;
  font-size: 13px;
}

.footer-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-flower {
  color: var(--orange);
  font-size: 18px;
}

.icp-link {
  color: #8e877a;
  text-decoration: none;
}

.icp-link:hover {
  color: var(--blue);
  text-decoration: underline;
}

@keyframes twinkle {
  from { opacity: 0.35; transform: scale(0.8) rotate(-10deg); }
  to { opacity: 1; transform: scale(1.1) rotate(8deg); }
}

@media (max-width: 760px) {
  main {
    width: min(100% - 24px, 620px);
  }

  .hero {
    min-height: 500px;
    padding-top: 22px;
  }

  .hero-copy {
    padding-top: 84px;
  }

  h1 {
    font-size: clamp(40px, 13vw, 62px);
  }

  .hero-sticker {
    right: 18px;
    bottom: 32px;
    width: 96px;
    height: 96px;
    box-shadow: 6px 7px 0 var(--ink);
  }

  .sticker-face { font-size: 21px; }
  .sticker-pencil { top: -22px; font-size: 44px; }

  .library {
    padding: 40px 18px 34px;
    border-radius: 28px 28px 20px 20px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

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

  .game-visual {
    min-height: 230px;
  }

  footer {
    line-height: 1.6;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
