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

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: 
    radial-gradient(circle at 50% 15%, rgba(10, 132, 255, 0.12) 0%, transparent 55%),
    radial-gradient(circle at 85% 85%, rgba(191, 90, 242, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 15% 75%, rgba(50, 215, 75, 0.04) 0%, transparent 40%),
    var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-lg);
  padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom, 0px));
}

.header {
  text-align: center;
  margin-bottom: var(--space-lg);
  padding-top: var(--space-sm);
}

.title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  line-height: 1.2;
  text-wrap: balance;
}

.subtitle {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-top: var(--space-xs);
  text-transform: uppercase;
  text-wrap: balance;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-hint {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  text-wrap: balance;
}

.text-hint strong {
  color: var(--text-primary);
  font-weight: 500;
}

.text-center {
  text-align: center;
}

.text-small {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  margin-bottom: var(--space-md);
}

@media (max-width: 640px) {
  body {
    padding: 24px 16px 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  body.game-phase--guessing {
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .header {
    margin-bottom: 18px;
    padding-top: 6px;
  }

  .subtitle {
    margin-top: 4px;
  }
}

@media (max-width: 640px) and (max-height: 820px) {
  body.game-phase--guessing .header {
    display: none;
  }
}
