:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff;
  background: #083d49;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
html, body, #app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
#app { position: fixed; inset: 0; }
#game { display: block; width: 100%; height: 100%; }
[hidden] { display: none !important; }
.screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 3vmin;
  background: #052c3970;
  pointer-events: none;
}
.card {
  width: min(850px, 94vw);
  padding: clamp(20px, 5vmin, 64px);
  text-align: center;
  border: 2px solid #b1f8ff80;
  border-radius: 36px;
  background: #063d4ae8;
  box-shadow: 0 20px 90px #002c3970, inset 0 0 60px #43e6e810;
}
h1, h2 { margin: 0; font-weight: 950; line-height: 1; letter-spacing: -.045em; }
h1 { font-size: clamp(42px, 11vmin, 112px); text-shadow: 0 5px 0 #012a37; }
h1 span { display: block; color: #85f6ff; }
h2 { font-size: clamp(32px, 7vmin, 80px); margin-bottom: 3vmin; color: #85f6ff; }
.eyebrow { font-size: clamp(12px, 2vmin, 22px); font-weight: 800; letter-spacing: .15em; color: #c0f8fb; }
.subtitle { font-size: clamp(18px, 3.4vmin, 38px); font-weight: 600; margin: 3vmin 0 4vmin; }
button { font: inherit; cursor: pointer; border: 0; color: #053841; }
.play {
  pointer-events: auto;
  min-height: 80px;
  min-width: min(320px, 75vw);
  padding: 20px 32px;
  border-radius: 24px;
  font-size: clamp(22px, 3.6vmin, 40px);
  font-weight: 900;
  background: #a8fb5f;
  box-shadow: 0 7px 0 #498b26, 0 12px 30px #0004;
}
.play:active { transform: translateY(4px); box-shadow: 0 3px 0 #498b26; }
.play:disabled { opacity: .6; cursor: wait; }
button:focus-visible { outline: 4px solid white; outline-offset: 6px; }
.hint { margin: 4vmin 0 0; font-size: clamp(12px, 2vmin, 22px); color: #ceeff1; }
#hud {
  pointer-events: none;
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  left: 3vmin;
  right: max(95px, 12vmin);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.counter {
  display: flex;
  flex-direction: column;
  min-width: 130px;
  padding: 12px 24px;
  border: 2px solid #a3f7ff80;
  border-radius: 22px;
  background: #043744e6;
  text-align: center;
}
.counter span { font-size: clamp(12px, 1.9vmin, 22px); font-weight: 800; letter-spacing: .1em; }
.counter strong { font-size: clamp(32px, 6vmin, 72px); font-variant-numeric: tabular-nums; line-height: 1.1; }
.final-score { display: block; font-size: clamp(60px, 14vmin, 140px); line-height: 1; color: #a8fb5f; }
.record { font-size: clamp(18px, 3vmin, 30px); margin: 2vmin 0 4vmin; }
#logo {
  position: absolute;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: clamp(80px, 11vmin, 150px);
  pointer-events: none;
  filter: drop-shadow(0 2px 6px #0008);
}
#btn-fullscreen {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: clamp(60px, 8vmin, 90px);
  height: clamp(60px, 8vmin, 90px);
  border: 2px solid #a3f7ff80;
  border-radius: 18px;
  font-size: 40px;
  line-height: 1;
  background: #043744e6;
  color: #fff;
}
@media (max-height: 500px) {
  .card { padding: 16px; }
  h1 span { display: inline; }
  .eyebrow, .subtitle, .record, .hint { margin: 12px 0; }
  .play { min-height: 64px; padding: 12px 24px; }
}
@media (max-width: 450px) {
  .counter { min-width: 92px; padding: 10px 14px; }
}
