.wpcs-game-card {
  max-width: 560px;
  margin: 1.25rem auto;
  padding: 1rem;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 6px 24px rgba(2, 6, 23, 0.08);
  border: 1px solid #e5e7eb;
  text-align: center;
}

body.wpcs-no-scroll {
  overflow: hidden;
  overscroll-behavior: none;
}

.wpcs-screen h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.wpcs-screen {
  animation: wpcs-fade-in 0.2s ease;
}

.wpcs-screen[hidden] {
  display: none !important;
}

.wpcs-scoreboard {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.wpcs-instructions {
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #374151;
  font-size: 0.94rem;
  line-height: 1.4;
}

.wpcs-prize-note {
  margin: 0.6rem 0 0.2rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 0.94rem;
}

.wpcs-countdown-note {
  margin: 0.55rem 0 0.2rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 0.92rem;
}

#wpcs-canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #111827;
}

.wpcs-touch-controls {
  margin-top: 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.42rem;
  touch-action: manipulation;
}

.wpcs-touch-controls-row {
  display: flex;
  justify-content: center;
  gap: 0.42rem;
}

.wpcs-touch-btn {
  width: 52px;
  height: 52px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.wpcs-touch-btn:active {
  background: #e2e8f0;
}

.wpcs-actions {
  margin-top: 0.8rem;
}

.wpcs-start-action {
  margin-top: 1rem;
}

#wpcs-intro-screen,
#wpcs-end-screen {
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
}

.wpcs-message {
  min-height: 1.5rem;
  margin-top: 0.65rem;
  color: #374151;
}

.wpcs-ranking-form-wrap {
  margin-top: 0.3rem;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #f9fafb;
}

.wpcs-final-score {
  margin: 0 0 0.45rem;
  font-size: 1.02rem;
}

.wpcs-best-score-note {
  margin: 0 0 0.5rem;
  color: #475569;
  font-size: 0.95rem;
}

.wpcs-ranking-form-wrap label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
  text-align: center;
}

.wpcs-ranking-form-wrap input[type="text"] {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 0.55rem;
  text-align: center;
}

.wpcs-ranking-form-wrap .button + .wpcs-actions {
  margin-top: 0.8rem;
}

.wpcs-admin-wrap code {
  display: inline-block;
  padding: 0.3rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 0.95rem;
}

.wpcs-settings-form input[type="color"] {
  width: 64px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
}

@media (max-width: 640px) {
  .wpcs-game-card {
    padding: 0.85rem;
  }

  .wpcs-scoreboard {
    flex-direction: column;
    align-items: flex-start;
  }

  .wpcs-touch-btn {
    width: 60px;
    height: 60px;
    font-size: 1.45rem;
  }
}

@keyframes wpcs-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
