:root {
  --blue: #0069d9;
  --red: #e31837;
  --light: #f4f7fb;
  --text: #1f2d3d;
}

body {
  margin: 0;
  font-family: "Arial", sans-serif;
  background: #e7e7e7;
  color: var(--text);
}

.site-header {
  border-bottom: 1px solid #d7dde7;
  background: #fff;
  font-family: Roboto, Arial, sans-serif;
  font-size: 17px;
}

.site-header a,
.site-header button,
.site-header input,
.site-header p {
  font-family: inherit;
  font-size: inherit;
}

.header-inner {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.header-notice {
  background: #0062bf;
  color: white;
}

.header-notice-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  font-weight: 700;
}

.header-notice p {
  margin: 0;
}

.notice-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f6ff;
  color: #0062bf;
  display: inline-grid;
  place-items: center;
  font-weight: 900;
}

.header-main {
  border-bottom: 1px solid #dfe5ee;
}

.header-main .header-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.8rem;
  min-width: 0;
}

.menu-btn {
  border: 0;
  background: none;
  color: #0062bf;
  font-weight: 800;
  display: grid;
  gap: 0.15rem;
  justify-items: center;
  cursor: pointer;
}

.menu-btn span:first-child {
  font-size: 1.8rem;
  line-height: 1;
}

.brand-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  width: clamp(170px, 12vw, 235px);
  max-width: 28vw;
  height: auto;
}

.search-box {
  display: flex;
  align-items: center;
  flex: 1 1 290px;
  max-width: 430px;
  margin: 0 0.35rem;
  border: 1px solid #8fa4bf;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  min-width: 220px;
}

.search-box input {
  border: 0;
  padding: 0.9rem 1.1rem;
  flex: 1;
}

.search-box button {
  border: 0;
  width: 60px;
  height: 52px;
  border-radius: 999px;
  background: #0b69cd;
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  white-space: nowrap;
  min-width: 0;
}

.header-links a {
  color: #0062bf;
  font-weight: 800;
  text-decoration: none;
}

.header-links a.drive {
  color: #ff5a2a;
}

.store-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.circle-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0062bf;
  color: #fff;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  font-size: 1.35rem;
  line-height: 1;
  flex: 0 0 auto;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.25rem;
}

.header-categories {
  overflow-x: auto;
  border-top: 1px solid #eef2f7;
}

.header-categories .header-inner {
  display: flex;
}

.header-categories a {
  flex: 0 0 auto;
  padding: 0.9rem 1.25rem;
  border-right: 1px solid #e3e9f1;
  text-decoration: none;
  color: #03735f;
  font-weight: 700;
}

.header-categories a:nth-child(2) {
  color: #c70909;
}

.header-categories a:nth-child(6),
.header-categories a:nth-child(7),
.header-categories a:nth-child(8) {
  color: #005fc0;
}

.wrapper {
  max-width: 960px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
}

.page-hero {
  background: #e7e7e7;
  padding: 1.2rem 0 1.5rem;
  margin-bottom: 1rem;
}

.page-hero-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.page-hero-links a {
  color: #0062bf;
  font-weight: 700;
  text-decoration: underline;
}

.page-hero-links .back-link {
  text-decoration: none;
  font-weight: 800;
}

.page-hero-links .separator {
  color: #1f2d3d;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3.6vw, 2.9rem);
  line-height: 1.05;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 1.4rem;
  box-shadow: 0 8px 30px rgba(0, 35, 90, 0.08);
  border: 1px solid #dbe6f3;
  margin-bottom: 1rem;
}

.hidden {
  display: none;
}

.badge {
  display: inline-block;
  background: var(--red);
  color: white;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
}

.intro {
  color: #47586d;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

label {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  gap: 0.3rem;
}

input {
  border: 2px solid #d4e1f0;
  border-radius: 10px;
  padding: 0.65rem;
  font-size: 1rem;
}

input:focus {
  outline: none;
  border-color: var(--blue);
}

.full {
  grid-column: 1 / -1;
}

.disclaimer {
  margin: 0;
  font-size: 0.86rem;
  color: #5b6d83;
}

.cta {
  border: none;
  border-radius: 12px;
  background: linear-gradient(110deg, var(--blue), var(--red));
  color: white;
  font-size: 1.02rem;
  font-weight: 800;
  padding: 0.8rem 1rem;
  cursor: pointer;
}

#step-win {
  text-align: center;
}

.cta-attention {
  font-size: 1.55rem;
  font-weight: 900;
  padding: 1rem 2rem;
  border-radius: 16px;
  animation: pulse 1.5s ease-in-out infinite;
  box-shadow: 0 10px 22px rgba(0, 79, 187, 0.35);
}

.cta-attention:hover {
  transform: translateY(-2px) scale(1.03);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 10px 22px rgba(0, 79, 187, 0.35);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 14px 30px rgba(227, 24, 55, 0.42);
  }
}


.puzzle-board {
  display: grid;
  grid-template-columns: repeat(3, 100px);
  grid-template-rows: repeat(3, 100px);
  gap: 6px;
  justify-content: center;
  margin: 1rem auto;
}

.tile {
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid white;
  background-image: url("puzzle-image.png");
  background-repeat: no-repeat;
  background-size: 300px 300px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.tile.selected {
  border-color: var(--red);
  transform: scale(1.03);
}

.hint {
  text-align: center;
  font-weight: 700;
  color: #4e5f74;
}

.surprise {
  text-align: center;
}

.gift-instruction {
  margin: 0.3rem 0 0;
  color: #7a3a00;
  font-weight: 700;
}

.gift {
  width: 300px;
  margin: 2.3rem auto 0;
  position: relative;
  height: 360px;
  filter: drop-shadow(0 18px 28px rgba(170, 58, 0, 0.2));
  cursor: default;
}

.gift::before,
.gift::after {
  content: "";
  position: absolute;
  top: 20px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 6;
}

.gift::before {
  left: 35px;
  background: #ff8a00;
}

.gift::after {
  right: 40px;
  background: #ff4d4d;
}

.lid {
  position: absolute;
  width: 300px;
  height: 78px;
  top: 95px;
  left: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffb703, #ff7b00 45%, #e63946);
  transform-origin: 32px 64px;
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 3;
}

.box {
  position: absolute;
  width: 260px;
  height: 190px;
  bottom: 24px;
  left: 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, #ff9f1c, #ff5a2a 45%, #d7263d);
  overflow: hidden;
}

.box::before,
.lid::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #fff3b0, #ffd166 45%, #ffb703);
}

.box::before {
  top: 0;
  width: 34px;
  height: 100%;
}

.lid::before {
  top: 0;
  width: 40px;
  height: 100%;
}

.medal {
  position: absolute;
  inset: auto 0 36px;
  margin: 0 auto;
  width: 215px;
  min-height: 140px;
  border-radius: 40px;
  background: radial-gradient(circle at top, #ffe78a, #f6c947);
  color: #5e3d00;
  font-weight: 900;
  padding: 1.2rem 1rem;
  display: grid;
  place-items: center;
  text-wrap: balance;
  line-height: 1.25;
  opacity: 0;
  transform: translateY(34px) scale(0.5);
  transition: transform 950ms cubic-bezier(0.22, 1, 0.36, 1), opacity 600ms ease;
  z-index: 5;
}

.gift.open .lid {
  transform: rotate(-62deg) translate(-78px, 62px);
  animation: lid-pop 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.gift.open .box {
  animation: box-bounce 900ms ease-out;
}

.gift.open .medal {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: medal-pop 1000ms 160ms both cubic-bezier(0.22, 1, 0.36, 1);
}

.gift.open::before,
.gift.open::after {
  animation: sparkle 1000ms 220ms ease-out both;
}

.gift.ready {
  cursor: pointer;
}

.gift.ready .box {
  animation: gift-shake 820ms ease-in-out infinite;
}

.gift.ready .lid {
  animation: gift-shake 820ms 130ms ease-in-out infinite;
}

@keyframes lid-pop {
  0% {
    transform: rotate(0deg) translate(0, 0);
  }
  35% {
    transform: rotate(-30deg) translate(14px, -70px);
  }
  70% {
    transform: rotate(-78deg) translate(-86px, 70px);
  }
  100% {
    transform: rotate(-62deg) translate(-78px, 62px);
  }
}

@keyframes box-bounce {
  0% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-14px) scale(1.03);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes gift-shake {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(-4px) rotate(-1.2deg);
  }
  50% {
    transform: translateX(4px) rotate(1.2deg);
  }
  75% {
    transform: translateX(-3px) rotate(-0.8deg);
  }
}

@keyframes medal-pop {
  0% {
    transform: translateY(38px) scale(0.45);
  }
  70% {
    transform: translateY(-10px) scale(1.06);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes sparkle {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.4);
  }
  45% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translateY(-44px) scale(1.2);
  }
}

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

  .header-notice p {
    font-size: 0.85rem;
  }

  .header-main .header-inner {
    flex-wrap: wrap;
  }

  .header-links {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .brand-logo {
    width: 180px;
  }

  .search-box {
    max-width: none;
  }
}

@media (max-width: 1280px) {
  .store-link span:last-child {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .brand-logo {
    width: 180px;
  }

  .search-box {
    max-width: none;
  }
}
