:root {
  --sky-top: #5ebbd8;
  --sky-mid: #9fdcf0;
  --field: #b8e56f;
  --field-deep: #7cbc3a;
  --sun: #ffd45a;
  --coral: #ff7a59;
  --coral-deep: #e85a3a;
  --leaf: #2f8f5b;
  --ink: #1f3a2e;
  --ink-soft: #3d5c4a;
  --paper: #fff9ee;
  --paper-edge: #ffe4a8;
  --lantern: #ff5a4a;
  --sen-pink: #ff8fab;
  --sen-blush: #ffc2d1;
  --shadow: 0 10px 0 rgba(31, 58, 46, 0.12);
  --font-display: "Fredoka", system-ui, sans-serif;
  --font-body: "Be Vietnam Pro", system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 42%, #d9f2a8 72%, var(--field) 100%);
  background-attachment: fixed;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

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

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
}

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

.sun {
  position: absolute;
  top: 4%;
  right: 8%;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff7c8, var(--sun) 60%, #f0a83a);
  box-shadow: 0 0 40px rgba(255, 212, 90, 0.55);
  animation: pulse 4s ease-in-out infinite;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  animation: drift 34s linear infinite;
}

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

.cloud.c1 {
  width: 100px;
  height: 36px;
  top: 10%;
  left: -25%;
}
.cloud.c1::before {
  width: 44px;
  height: 44px;
  top: -22px;
  left: 16px;
}
.cloud.c1::after {
  width: 54px;
  height: 54px;
  top: -28px;
  left: 40px;
}

.cloud.c2 {
  width: 80px;
  height: 30px;
  top: 18%;
  left: -30%;
  animation-duration: 42s;
  animation-delay: -12s;
  opacity: 0.8;
}
.cloud.c2::before {
  width: 36px;
  height: 36px;
  top: -18px;
  left: 12px;
}
.cloud.c2::after {
  width: 44px;
  height: 44px;
  top: -22px;
  left: 32px;
}

.hill {
  position: absolute;
  bottom: -40px;
  width: 120%;
  height: 180px;
  left: -10%;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, var(--field) 0%, var(--field-deep) 100%);
  opacity: 0.9;
}

.hill.back {
  bottom: 20px;
  height: 140px;
  opacity: 0.55;
  filter: saturate(0.9);
}

.lantern {
  position: absolute;
  top: 8%;
  width: 18px;
  height: 26px;
  background: var(--lantern);
  border-radius: 8px 8px 10px 10px;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.12);
  animation: sway 3.2s ease-in-out infinite;
}

.lantern::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 2px;
  height: 10px;
  background: rgba(31, 58, 46, 0.35);
  transform: translateX(-50%);
}

.lantern.l1 {
  left: 10%;
}
.lantern.l2 {
  right: 14%;
  animation-delay: -1s;
}

@keyframes drift {
  to {
    transform: translateX(140vw);
  }
}

@keyframes pulse {
  50% {
    transform: scale(1.06);
  }
}

@keyframes sway {
  50% {
    transform: rotate(6deg);
  }
}

@keyframes bob {
  50% {
    transform: translateY(-8px);
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

.page {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: calc(18px + var(--safe-top)) 18px calc(28px + var(--safe-bottom));
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
  padding: 4px 0 8px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 4px 0 rgba(31, 58, 46, 0.18);
}

.brand-sub {
  display: inline-block;
  margin-top: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--sun);
  color: #6a4a00;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow);
}

.tagline {
  margin: 0;
  max-width: 36ch;
  color: var(--ink-soft);
  font-weight: 600;
  line-height: 1.45;
  text-align: right;
}

.cast-stage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  align-items: end;
  margin: 22px 0 10px;
  min-height: 170px;
}

.cast-stage .mascot {
  justify-self: center;
  animation: bob 2.8s ease-in-out infinite;
}

.cast-stage .mascot:nth-child(2) {
  animation-delay: -0.6s;
}
.cast-stage .mascot:nth-child(3) {
  animation-delay: -1.2s;
}

.mascot {
  width: 110px;
  height: 130px;
}

.mascot svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mascot.lg {
  width: 168px;
  height: 220px;
}

.mascot.lg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.speech {
  margin: 0 auto 18px;
  max-width: 36ch;
  background: var(--paper);
  border: 3px solid var(--paper-edge);
  border-radius: 22px;
  padding: 12px 16px;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}

.speech::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-bottom-color: var(--paper-edge);
}

.section-title {
  margin: 8px 0 12px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  text-align: left;
}

.games {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px;
  border-radius: 28px;
  background: rgba(255, 249, 238, 0.95);
  border: 4px solid var(--paper-edge);
  box-shadow: var(--shadow);
}

.game-card.live {
  border-color: #8fe0ad;
}

.game-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.game-card p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 600;
  line-height: 1.4;
}

.badge {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge.open {
  background: #c9f5d6;
  color: #1f7a45;
}

.badge.soon {
  background: #ffe8b0;
  color: #8a5a00;
}

.game-card .btn {
  margin-top: auto;
}

.welcome {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
}

.welcome .cast-stage {
  margin: 0;
  min-height: 0;
  flex: none;
}

.welcome .speech {
  margin: 0;
  max-width: none;
  text-align: left;
}

.welcome .speech::before {
  top: 50%;
  left: -18px;
  transform: translateY(-50%);
  border: 8px solid transparent;
  border-right-color: var(--paper-edge);
  border-bottom-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 12px 20px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  background: linear-gradient(180deg, #ff9a78, var(--coral));
  box-shadow: 0 8px 0 var(--coral-deep);
  transition: transform 0.12s ease;
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 4px 0 var(--coral-deep);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
  box-shadow: 0 6px 0 rgba(31, 58, 46, 0.12);
}

.footer-note {
  margin: 28px 0 8px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 600;
}

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

@media (max-width: 720px) {
  .hero,
  .welcome {
    flex-direction: column;
    text-align: center;
  }

  .brand-lockup,
  .tagline,
  .section-title,
  .welcome .speech {
    text-align: center;
  }

  .welcome .speech::before {
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: var(--paper-edge);
  }
}

@media (max-width: 520px) {
  .games {
    grid-template-columns: 1fr;
  }

  .cast-stage {
    min-height: 140px;
  }

  .mascot {
    width: 92px;
    height: 110px;
  }
}

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