* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #78c2d6;
  font-family: 'Quicksand', 'Trebuchet MS', sans-serif;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  overscroll-behavior: none;
}

#view {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: block;
  touch-action: none;
}

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 16px;
  text-align: center;
  text-shadow: 0 2px 14px rgba(20, 30, 50, 0.35);
  background: linear-gradient(to bottom, rgba(15, 30, 50, 0.08), rgba(15, 30, 50, 0.3));
  z-index: 5;
}

.screen.dim {
  background: rgba(15, 25, 45, 0.4);
}

.hidden {
  display: none !important;
}

h1 {
  font-size: clamp(42px, 8vw, 88px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

h2 {
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 700;
}

.sub {
  font-size: clamp(18px, 2.6vw, 26px);
  font-weight: 600;
}

.hint {
  max-width: 520px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  opacity: 0.9;
}

.best {
  min-height: 1.2em;
  font-size: 20px;
  font-weight: 700;
}

.score {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
}

.btn {
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  color: #24343b;
  text-shadow: none;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  border-radius: 999px;
  padding: 12px 32px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease;
}

.btn:active {
  transform: scale(0.95);
}

.btn.big {
  font-size: 30px;
  padding: 16px 60px;
}

.back {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  opacity: 0.85;
}

#controls {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  gap: 10px;
  z-index: 10;
}

.round {
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  color: #fff;
  background: rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
