:root {
  --bg: #f7f7f3;
  --ink: #171717;
  --muted: #5d6673;
  --panel: #ffffff;
  --ticket: #d9d9d9;
  --accent: #e9562f;
  --accent-soft: #ffe1d6;
  --ring: rgba(233, 86, 47, 0.22);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    "YuGothic",
    "Noto Sans JP",
    sans-serif;
  background:
    radial-gradient(circle at 20% 14%, rgba(233, 86, 47, 0.08), transparent 28rem),
    linear-gradient(160deg, var(--bg), #ffffff 52%, #f1f4f8);
}

.screen {
  display: grid;
  min-height: 100svh;
  place-items: center;
  width: 100%;
  padding: clamp(18px, 5vw, 36px) 18px;
}

.ticket {
  width: min(100%, 390px);
  min-height: calc(100svh - clamp(36px, 10vw, 72px));
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(24px, 6vh, 44px);
  padding: clamp(16px, 5vw, 28px) 0;
}

.eyebrow {
  margin: 0;
  font-size: clamp(13px, 3.4vw, 15px);
  font-weight: 700;
  letter-spacing: 0;
}

.result-card {
  position: relative;
  display: grid;
  width: min(74vw, 220px);
  max-width: 220px;
  aspect-ratio: 1 / 1;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.result-card::before,
.result-card::after {
  display: none;
}

.shine {
  display: none;
}

.result-badge {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 1;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px 18px;
  border-radius: 999px;
  border: 2px solid #171717;
  background: #ffffff;
  box-shadow: none;
  text-align: center;
}

.result-card:not(.is-cover-ready) .result-badge {
  opacity: 0;
}

.result-badge h1 {
  margin: 0;
  font-size: clamp(21px, 6vw, 27px);
  line-height: 1.2;
  letter-spacing: 0;
}

.result-badge p,
.result-badge strong {
  margin: 0;
  font-size: clamp(12px, 3.5vw, 14px);
  line-height: 1.45;
}

.result-badge strong {
  font-weight: 800;
}

.scratch-canvas {
  position: absolute;
  inset: -4px;
  z-index: 3;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  border-radius: inherit;
  background:
    linear-gradient(135deg, #f4f4f4, #b9bdc4 48%, #ececec),
    #d2d4d8;
  touch-action: none;
  cursor: pointer;
  opacity: 1;
  transition: opacity 520ms ease;
}

.result-card.is-cover-ready .scratch-canvas {
  background: transparent;
}

.result-card.is-scratching {
  cursor: pointer;
}

.result-card.is-revealed {
  cursor: default;
}

.result-card.is-revealed .scratch-canvas {
  pointer-events: none;
  cursor: default;
  opacity: 0;
}

.notice {
  width: min(100%, 280px);
  margin: 0;
  color: var(--ink);
  font-size: clamp(13px, 3.4vw, 15px);
  font-weight: 700;
  line-height: 1.8;
  text-align: center;
}

.notice[hidden] {
  display: block;
  visibility: hidden;
}

.version-label {
  position: fixed;
  right: 10px;
  bottom: 8px;
  z-index: 10;
  margin: 0;
  color: rgba(23, 23, 23, 0.38);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0;
  pointer-events: none;
  user-select: none;
}

@keyframes sweep {
  0%,
  35% {
    transform: translateX(-78%);
  }

  72%,
  100% {
    transform: translateX(78%);
  }
}

@media (max-width: 360px) {
  .screen {
    padding-right: 14px;
    padding-left: 14px;
  }

  .ticket {
    min-height: calc(100svh - 28px);
  }

  .result-card {
    width: min(74vw, 210px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .shine {
    animation: none;
    transform: none;
  }
}
