.game-hero {
  padding-top: calc(var(--header-h) + 54px);
}

.game-hero__inner {
  max-width: 820px;
  margin-bottom: clamp(28px, 4vw, 46px);
}

.game-hero__inner .lead {
  margin-top: 18px;
}



/* stage */

.game-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 560px;
  padding: clamp(20px, 3vw, 36px);
  border-radius: var(--r-xl);
  border: 1px solid var(--surface-line);
  background: var(--bg-1);
  overflow: hidden;
}

.game-stage[data-current="play"] {
  padding: clamp(14px, 2vw, 22px);
}

.game-screen {
  display: none;
  position: relative;
}

.game-screen.is-active {
  display: block;
  animation: game-in 0.5s var(--ease) both;
}

@keyframes game-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}



/* intro */

.game-intro {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
}

.game-rules {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.game-rules__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 16px;
  color: var(--text-1);
}

.game-rules__item b {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--text-0);
}

.game-rules__mark {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
}

.game-rules__mark--orb {
  background: radial-gradient(circle at 35% 30%, #fff3d6 0%, #ffc35c 30%, #faa41a 72%, #a85500 100%);
  box-shadow: 0 0 14px rgba(250, 164, 26, 0.5);
}

.game-rules__mark--mine,
.game-over__icon {
  border-radius: 0;
  background: radial-gradient(circle, #3a0b0b 0 30%, #ff4a4a 31% 100%);
  clip-path: polygon(100% 50%, 80% 61%, 88% 82%, 66% 78%, 59% 99%, 44% 82%, 25% 93%, 25% 71%, 3% 67%, 18% 50%, 3% 33%, 25% 29%, 25% 7%, 44% 18%, 59% 1%, 66% 22%, 88% 18%, 80% 39%);
}

.game-rules__mark--wheel {
  background: repeating-conic-gradient(#faa41a 0 36deg, #262626 36deg 72deg);
  box-shadow: 0 0 0 2px #faa41a;
}

.game-intro__controls {
  margin-top: 22px;
  font-size: 14px;
  color: var(--text-2);
}

.game-fair {
  margin-top: 16px;
  max-width: 440px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--surface-line-strong);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}



/* signup */

.game-signup {
  padding: clamp(20px, 2.6vw, 28px);
  border-radius: var(--r-lg);
  border: 1px solid var(--surface-line);
  background: var(--bg-0);
}

.game-signup .h3 {
  margin-bottom: 8px;
}

.game-signup__note {
  margin-bottom: 22px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
}

.game-signup [data-show] {
  display: none;
}

.game-signup[data-step="name"] [data-show="name"],
.game-signup[data-step="wait"] [data-show="wait"],
.game-signup[data-step="done"] [data-show="done"],
.game-signup[data-step="won"] [data-show="won"],
.game-signup[data-step="over"] [data-show="over"] {
  display: block;
}

.game-start {
  width: 100%;
  margin-top: 4px;
}

.game-signup[data-step="wait"] .game-start,
.game-signup[data-step="won"] .game-start,
.game-signup[data-step="over"] .game-start,
.game-signup[data-step="name"] .game-signup__retry {
  display: none;
}

.game-signup__tg {
  width: 100%;
  gap: 12px;
}

.game-signup__tg svg {
  width: 20px;
  height: 20px;
}

.game-signup__steps {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-1);
}

.game-signup__pulse {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-2);
}

.game-signup__pulse i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: signup-pulse 1.4s ease-in-out infinite;
}

.game-signup__status {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--accent);
  font-size: 15px;
  color: var(--text-1);
}

.game-signup__status b {
  color: var(--accent);
}

.game-signup__status .btn {
  margin-top: 10px;
}

.game-signup__code {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
}

.game-signup__retry {
  display: block;
  margin: 14px auto 0;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.game-signup__retry:hover {
  color: var(--accent);
}

.game-signup__policy {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--text-2);
}

.game-signup .form-consent {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
}

html.is-tg .header,
html.is-tg .sticky-cta,
html.is-tg .mobile-menu,
html.is-tg .footer,
html.is-tg .aurora,
html.is-tg .ghost-word,
html.is-tg .game-hero__inner,
html.is-tg .game-hero ~ .section {
  display: none;
}

html.is-tg .game-hero {
  padding: 12px 0 24px;
}

html.is-tg .container {
  padding-inline: 12px;
}

html.is-tg .game-stage {
  min-height: calc(100vh - 36px);
  border-radius: var(--r-lg);
}

html.is-tg .game-intro__rules {
  order: 2;
}

html.is-tg .game-signup[data-step="wait"] [data-signup-link],
html.is-tg .game-signup[data-step="wait"] .game-signup__steps:not(.game-signup__share-hint),
html.is-tg .game-signup[data-step="wait"] .game-signup__pulse {
  display: none;
}

html.is-tg .game-signup__share,
html.is-tg .game-signup__share-hint {
  display: block;
}

@keyframes signup-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

@media (max-width: 900px) {
  .game-intro {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .game-stage {
    min-height: 0;
    border-radius: var(--r-lg);
  }
}
