body.page-scratch {
  --scratch-pink: #ef5d78;
  --scratch-gold: #f2c34f;
  --scratch-text: #222;
  --scratch-line: #eadfcb;
  margin: 0;
  color: var(--scratch-text);
  background:
    radial-gradient(circle at 8% 7%, rgba(121, 196, 65, 0.11) 0 9px, transparent 10px),
    radial-gradient(circle at 92% 9%, rgba(245, 66, 151, 0.1) 0 12px, transparent 13px),
    radial-gradient(circle at 12% 88%, rgba(45, 176, 214, 0.1) 0 10px, transparent 11px),
    linear-gradient(180deg, #fffdf9 0%, #fff7ef 52%, #fffdf9 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

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

.page-scratch .scratch-page-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 18px 14px 48px;
}

.page-scratch .scratch-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.page-scratch .scratch-logo {
  display: flex;
  align-items: center;
  height: 46px;
}

.page-scratch .scratch-logo img {
  display: block;
  width: 122px;
  height: auto;
}

.page-scratch .scratch-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  padding: 38px 28px 30px;
  overflow: hidden;
  border: 1px solid rgba(198, 146, 46, 0.28);
  border-radius: 30px;
  background:
    radial-gradient(circle at 13% 14%, rgba(255, 255, 255, 0.98) 0 5px, transparent 6px),
    radial-gradient(circle at 87% 17%, rgba(255, 255, 255, 0.92) 0 4px, transparent 5px),
    radial-gradient(circle at 20% 78%, rgba(255, 255, 255, 0.7) 0 8px, transparent 9px),
    linear-gradient(135deg, #fff9df 0%, #fff3e6 55%, #fff8f2 100%);
  box-shadow: 0 18px 44px rgba(100, 63, 10, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.page-scratch .scratch-hero::before,
.page-scratch .scratch-hero::after {
  position: absolute;
  color: rgba(229, 168, 41, 0.42);
  font-size: 34px;
  content: "✦";
  pointer-events: none;
}

.page-scratch .scratch-hero::before {
  top: 52px;
  left: 8%;
  transform: rotate(-10deg);
}

.page-scratch .scratch-hero::after {
  top: 92px;
  right: 8%;
  transform: rotate(12deg);
}

.page-scratch .scratch-hero-copy {
  text-align: center;
}

.page-scratch .scratch-gold-plate {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 330px;
  margin-bottom: 26px;
  padding: 16px 40px;
  overflow: hidden;
  border: 1px solid #b67b12;
  border-radius: 999px;
  color: #5f3b00;
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(255, 255, 255, 0.72) 27%, transparent 36% 100%),
    linear-gradient(180deg, #fff7c6 0%, #f7dd7a 20%, #e9b93f 53%, #c98816 100%);
  box-shadow:
    0 10px 22px rgba(128, 83, 0, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.9),
    inset 0 -3px 0 rgba(107, 65, 0, 0.18);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.page-scratch .scratch-gold-plate::before {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(125, 77, 0, 0.34);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.page-scratch .scratch-gold-plate::after {
  position: absolute;
  top: 2px;
  right: 14px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 21px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.95);
  content: "✦";
  transform: rotate(12deg);
}

.page-scratch .scratch-plate-coin {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 10px;
  border: 3px solid #fbe899;
  border-radius: 50%;
  color: #744900;
  background: linear-gradient(180deg, #f9da68, #c98917);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 2px 4px rgba(93, 57, 0, 0.18);
  font-size: 14px;
  font-weight: 900;
}

.page-scratch .scratch-hero-title {
  margin: 0;
  color: #292932;
  font-size: 40px;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 0.02em;
}

.page-scratch .scratch-hero-sub {
  font-size: 40px;
  font-weight: 800;
}

.page-scratch .scratch-nowrap {
  white-space: nowrap;
}

.page-scratch .scratch-card {
  position: relative;
  width: min(100%, 400px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  overflow: hidden;
  border: 9px solid #fff;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(57, 42, 18, 0.14), 0 0 0 3px rgba(222, 169, 52, 0.18);
}

.page-scratch .scratch-card::before {
  position: absolute;
  inset: 8px;
  z-index: 2;
  border: 1px solid rgba(207, 145, 26, 0.24);
  border-radius: 18px;
  content: "";
  pointer-events: none;
}

.page-scratch .scratch-result {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 5%, rgba(255, 231, 146, 0.8), transparent 36%),
    linear-gradient(180deg, #fffaf0 0%, #fff 100%);
  text-align: center;
}

.page-scratch .scratch-result-inner {
  width: 100%;
}

.page-scratch .scratch-coin {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: 0 auto 10px;
  border: 10px solid #ffe28a;
  border-radius: 50%;
  color: #936600;
  background: linear-gradient(180deg, #f8d665, #dda42e);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.75), 0 10px 20px rgba(150, 99, 10, 0.16);
  font-size: 40px;
  font-weight: 900;
}

.page-scratch .scratch-result h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.page-scratch .scratch-amount {
  margin: 8px 0;
  color: var(--scratch-pink);
  font-size: 36px;
  font-weight: 900;
  line-height: 1.3;
}

.page-scratch .scratch-coin-receive-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
  margin-top: 18px;
  padding: 14px 24px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(90deg, var(--scratch-pink), #ff8fa3);
  box-shadow: 0 5px 14px rgba(239, 93, 120, 0.25);
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
}

.page-scratch .scratch-coin-receive-btn:hover,
.page-scratch .scratch-coin-receive-btn:focus-visible {
  color: #fff;
  opacity: 0.9;
  text-decoration: none;
}

.page-scratch .scratch-result-expiration {
  margin-top: 10px;
  color: #666;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.page-scratch #scratchCanvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  touch-action: none;
}

.page-scratch .scratch-trigger {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: var(--scratch-text);
  background: transparent;
  cursor: pointer;
}

.page-scratch .scratch-trigger:focus-visible {
  outline: 3px solid var(--scratch-pink);
  outline-offset: -6px;
}

.page-scratch .scratch-trigger[disabled] {
  cursor: default;
}

.page-scratch .scratch-trigger[hidden] {
  display: none;
}

.page-scratch .scratch-guide {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  padding: 16px 28px;
  border: 1px solid rgba(180, 180, 185, 0.4);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.1);
  font-size: 23px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease;
}

.page-scratch .scratch-guide small {
  display: block;
  margin-top: 6px;
  color: #666;
  font-size: 13px;
  font-weight: 700;
}

.page-scratch .scratch-progress {
  margin-top: 10px;
  color: #666;
  font-size: 13px;
  text-align: center;
}

.page-scratch .scratch-sale-section {
  margin-top: 24px;
  padding: 30px 26px;
  border: 1px solid rgba(228, 199, 145, 0.55);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(69, 51, 20, 0.07);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.page-scratch .scratch-sale-section.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.page-scratch .scratch-sale-label {
  display: inline-block;
  margin: 0 0 8px;
  padding: 5px 14px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(90deg, #c99624, #f2d16b, #c99624);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px rgba(100, 70, 0, 0.25);
}

.page-scratch .scratch-sale-title {
  margin: 0 0 14px;
  color: #333;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.5;
}

.page-scratch .scratch-sale-title span {
  color: #b47b10;
}

.page-scratch .scratch-sale-coin-wrap {
  margin: 14px auto 6px;
  text-align: center;
}

.page-scratch .scratch-sale-coin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 520px;
  padding: 15px 20px;
  border-radius: 999px;
  color: #5f3b00;
  background: linear-gradient(90deg, #c99624, #f2d16b, #c99624);
  box-shadow: 0 8px 18px rgba(128, 83, 0, 0.18);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.4;
  text-decoration: none;
}

.page-scratch .scratch-sale-coin-link:hover,
.page-scratch .scratch-sale-coin-link:focus-visible {
  color: #5f3b00;
  opacity: 0.9;
  text-decoration: none;
}

.page-scratch .scratch-sale-lead {
  margin: 42px auto 4px;
  color: #555;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}

.page-scratch .scratch-sale-banners {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 600px;
  margin: 24px auto 0;
}

.page-scratch .scratch-sale-banners a,
.page-scratch .scratch-sale-banners img {
  display: block;
}

.page-scratch .scratch-sale-banners img {
  width: 100%;
  max-width: 295px;
  height: auto;
  border: 0;
  border-radius: 12px;
}

.page-scratch .scratch-coin-info {
  max-width: 620px;
  margin: 22px auto 18px;
  padding: 20px;
  border-radius: 20px;
  color: #595960;
  background: linear-gradient(135deg, rgba(121, 196, 65, 0.07), rgba(45, 176, 214, 0.06) 45%, rgba(245, 66, 151, 0.06));
  font-size: 14px;
  line-height: 1.9;
}

.page-scratch .scratch-coin-info strong {
  display: block;
  margin-bottom: 2px;
  color: #292932;
  font-size: 18px;
  line-height: 1.2;
}

.page-scratch .scratch-copyright {
  margin: 16px 0 0;
  text-align: center;
}

.page-scratch .sparkle-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  pointer-events: none;
}

.page-scratch .sparkle {
  position: absolute;
  width: var(--size);
  height: var(--size);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.35) rotate(0deg);
  animation: scratch-sparkle-pop var(--duration) ease-out forwards;
}

.page-scratch .sparkle::before,
.page-scratch .sparkle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 999px;
  background: var(--sparkle-color);
  box-shadow: 0 0 10px var(--sparkle-color);
  content: "";
  transform: translate(-50%, -50%);
}

.page-scratch .sparkle::before {
  width: 100%;
  height: 22%;
}

.page-scratch .sparkle::after {
  width: 22%;
  height: 100%;
}

@keyframes scratch-sparkle-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.25) rotate(0deg);
  }

  22% {
    opacity: 1;
  }

  72% {
    opacity: 0.95;
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--move-x)), calc(-50% + var(--move-y))) scale(1.18) rotate(150deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-scratch .scratch-guide,
  .page-scratch .scratch-sale-section {
    transition-duration: 0.01ms;
  }

  .page-scratch .sparkle {
    animation-duration: 0.01ms !important;
  }
}

@media (max-width: 520px) {
  .page-scratch .scratch-logo img {
    width: 104px;
  }

  .page-scratch .scratch-hero {
    padding: 28px 14px 22px;
    border-radius: 24px;
  }

  .page-scratch .scratch-gold-plate {
    width: 100%;
    min-width: 0;
    padding: 14px 22px;
    font-size: 17px;
  }

  .page-scratch .scratch-hero-title,
  .page-scratch .scratch-hero-sub {
    font-size: 30px;
  }

  .page-scratch .scratch-coin {
    width: 72px;
    height: 72px;
    margin-bottom: 6px;
    border-width: 8px;
    font-size: 34px;
  }

  .page-scratch .scratch-result h2 {
    margin-bottom: 4px;
    font-size: 19px;
  }

  .page-scratch .scratch-amount {
    margin: 5px 0;
    font-size: 32px;
  }

  .page-scratch .scratch-coin-receive-btn {
    width: 100%;
    min-width: 0;
    margin-top: 10px;
    padding: 12px 16px;
    font-size: 15px;
  }

  .page-scratch .scratch-result-expiration {
    margin-top: 8px;
    font-size: 12px;
  }

  .page-scratch .scratch-guide {
    padding: 14px 18px;
    font-size: 19px;
  }

  .page-scratch .scratch-sale-section {
    padding: 26px 16px;
    border-radius: 24px;
  }
}
