:root {
  --ink: #3b2a4a;
  --muted: #6d5a7a;
  --paper: #fff8f0;
  --pink: #ff8fb8;
  --mint: #7ce7c4;
  --lemon: #ffe066;
  --sky: #8ec5ff;
  --lavender: #d4b3ff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: "Gowun Dodum", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #c8ecff 0%, #ffe8f4 42%, #fff3d6 100%);
  overflow-x: hidden;
}

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

.cloud {
  position: absolute;
  background: #fff;
  border-radius: 999px;
  opacity: 0.72;
  filter: blur(0.2px);
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 999px;
}

.c1 {
  width: 140px;
  height: 42px;
  top: 8%;
  left: 8%;
  animation: drift 18s linear infinite;
}
.c1::before {
  width: 54px;
  height: 54px;
  left: 18px;
  top: -28px;
}
.c1::after {
  width: 70px;
  height: 46px;
  right: 16px;
  top: -20px;
}

.c2 {
  width: 180px;
  height: 50px;
  top: 18%;
  right: 6%;
  animation: drift 22s linear infinite reverse;
}
.c2::before {
  width: 64px;
  height: 64px;
  left: 24px;
  top: -32px;
}
.c2::after {
  width: 80px;
  height: 52px;
  right: 20px;
  top: -22px;
}

.c3 {
  width: 110px;
  height: 34px;
  top: 42%;
  left: 18%;
  animation: drift 26s linear infinite;
}
.c3::before {
  width: 42px;
  height: 42px;
  left: 12px;
  top: -20px;
}
.c3::after {
  width: 50px;
  height: 36px;
  right: 10px;
  top: -14px;
}

.bean {
  position: absolute;
  width: 46px;
  height: 58px;
  border-radius: 50% 50% 46% 46%;
  animation: bob 3.4s ease-in-out infinite;
}

.bean::before,
.bean::after {
  content: "";
  position: absolute;
  background: #2b2140;
  border-radius: 50%;
}

.bean::before {
  width: 7px;
  height: 9px;
  left: 12px;
  top: 18px;
}

.bean::after {
  width: 7px;
  height: 9px;
  right: 12px;
  top: 18px;
}

.b1 {
  background: var(--pink);
  top: 12%;
  right: 22%;
  animation-delay: 0.2s;
}
.b2 {
  background: var(--mint);
  top: 58%;
  left: 6%;
  animation-delay: 0.8s;
}
.b3 {
  background: var(--lemon);
  top: 70%;
  right: 10%;
  animation-delay: 1.4s;
}
.b4 {
  background: var(--lavender);
  top: 28%;
  left: 4%;
  animation-delay: 1.1s;
}

.hero,
.grid,
footer {
  position: relative;
  z-index: 1;
}

.hero {
  text-align: center;
  padding: 64px 20px 28px;
}

.badge {
  display: inline-block;
  background: #fff;
  border: 3px solid #2b2140;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  box-shadow: 4px 4px 0 #2b2140;
}

h1 {
  font-family: "Jua", sans-serif;
  font-size: clamp(48px, 8vw, 84px);
  letter-spacing: 0.02em;
  text-shadow: 4px 6px 0 #fff, 8px 10px 0 rgba(43, 33, 64, 0.12);
}

.tagline {
  margin-top: 8px;
  font-size: 18px;
  color: var(--muted);
}

.grid {
  width: min(1080px, calc(100% - 32px));
  margin: 24px auto 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.card {
  background: #fffdf8;
  border: 4px solid #2b2140;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 8px 10px 0 #2b2140;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

a.card {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

a.card:hover {
  transform: translate(-4px, -6px);
  box-shadow: 12px 16px 0 #2b2140;
}

.locked {
  opacity: 0.72;
  filter: grayscale(0.15);
}

.preview {
  height: 150px;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid #2b2140;
}

.bean-preview {
  background: linear-gradient(180deg, #9ad8ff 0%, #ffe4f2 100%);
}

.track {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 22px;
  height: 18px;
  background: repeating-linear-gradient(
    90deg,
    #ff9ec8 0 18px,
    #7ce7c4 18px 36px,
    #ffe066 36px 54px
  );
  border-radius: 10px;
  border: 3px solid #2b2140;
}

.mini-bean {
  position: absolute;
  bottom: 38px;
  width: 28px;
  height: 36px;
  border-radius: 50% 50% 45% 45%;
  border: 3px solid #2b2140;
  animation: race 2.4s ease-in-out infinite;
}

.mini-bean.pink {
  background: var(--pink);
  left: 18%;
}
.mini-bean.mint {
  background: var(--mint);
  left: 38%;
  animation-delay: 0.2s;
}
.mini-bean.lemon {
  background: var(--lemon);
  left: 56%;
  animation-delay: 0.35s;
}

.arch {
  position: absolute;
  right: 12%;
  bottom: 40px;
  width: 54px;
  height: 46px;
  border: 4px solid #2b2140;
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  background: rgba(255, 255, 255, 0.35);
}

.soon-preview.a {
  background: linear-gradient(135deg, #ffd6e8, #d9c6ff);
}
.soon-preview.b {
  background: linear-gradient(135deg, #c8f4e0, #cde8ff);
}

.lucky-preview {
  background: linear-gradient(180deg, #9ad8ff 0%, #f4d7e8 100%);
}

.lucky-stall {
  position: absolute;
  bottom: 28px;
  width: 46px;
  height: 34px;
  border: 3px solid #2b2140;
  border-radius: 8px 8px 4px 4px;
}

.lucky-stall::after {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  top: -10px;
  height: 12px;
  border: 3px solid #2b2140;
  border-radius: 8px;
  background: #fffdf8;
}

.lucky-stall.pink {
  left: 18%;
  background: var(--pink);
}

.lucky-stall.mint {
  right: 18%;
  background: var(--mint);
}

.lucky-coin {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--lemon);
  border: 3px solid #2b2140;
  animation: bob 2.2s ease-in-out infinite;
}

.lucky-coin.c-a {
  left: 48%;
  top: 28px;
}

.lucky-coin.c-b {
  left: 58%;
  top: 48px;
  animation-delay: 0.4s;
}

.mini-bean.lucky-b1 {
  left: 42%;
  bottom: 22px;
}

.mini-bean.lucky-b2 {
  left: auto;
  right: 28%;
  bottom: 22px;
  animation-delay: 0.25s;
}

.cell-preview {
  background: #eef6f1;
}

.mini-sheet {
  position: absolute;
  inset: 18px 22px 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  border: 3px solid #2b2140;
  background: #fff;
}

.mini-sheet span {
  border-right: 2px solid #cfe3d8;
  border-bottom: 2px solid #cfe3d8;
}

.mini-sheet span.g {
  background: #217346;
}

.mini-sheet span.d {
  background: #163d28;
}

.meta {
  padding: 16px 18px 8px;
}

.pill {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 2px solid #2b2140;
  background: #efe6ff;
}

.pill.live {
  background: var(--lemon);
}

h2 {
  font-family: "Jua", sans-serif;
  font-size: 28px;
  margin: 8px 0 6px;
}

.meta p {
  color: var(--muted);
  line-height: 1.5;
}

.meta ul {
  display: flex;
  gap: 8px;
  list-style: none;
  margin-top: 12px;
  flex-wrap: wrap;
}

.meta li {
  background: #fff;
  border: 2px solid #2b2140;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 13px;
}

.go {
  margin: 8px 18px 18px;
  display: inline-flex;
  align-self: flex-start;
  font-family: "Jua", sans-serif;
  background: var(--pink);
  border: 3px solid #2b2140;
  border-radius: 14px;
  padding: 8px 14px;
  box-shadow: 3px 3px 0 #2b2140;
}

footer {
  text-align: center;
  padding: 8px 16px 40px;
  color: var(--muted);
}

@keyframes drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(40px);
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg);
  }
  50% {
    transform: translateY(-14px) rotate(8deg);
  }
}

@keyframes race {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: max(36px, env(safe-area-inset-top));
    padding-left: 16px;
    padding-right: 16px;
  }
  h1 {
    font-size: clamp(44px, 14vw, 72px);
  }
  .sky .bean {
    display: none;
  }
  .grid {
    width: min(1080px, calc(100% - 20px));
    gap: 16px;
  }
  .go {
    min-height: 44px;
    align-items: center;
  }
  footer {
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }
}
