html, body {
  margin: 0;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  width: 100%;
  height: 100%;
  background: #070f08;
  font-family: 'Courier New', ui-monospace, Menlo, Consolas, monospace;
}

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

#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #070f08;
}

.hidden { display: none !important; }

#hud {
  position: fixed;
  top: calc(10px + var(--thela-ad-band, 96px));
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 4;
  pointer-events: none;
  color: #eaffe0;
  text-shadow: 2px 2px 0 #000;
}

#length {
  font-size: clamp(22px, 8vw, 40px);
  font-weight: 900;
  color: #7fff3d;
}

#best {
  font-size: clamp(11px, 3.4vw, 16px);
  color: #b8ffa0;
  background: rgba(0,0,0,0.3);
  padding: 3px 8px;
  border-radius: 6px;
}

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  padding-top: calc(24px + var(--thela-ad-band, 96px));
  box-sizing: border-box;
  text-align: center;
  background: linear-gradient(180deg, #0a1a0c 0%, #0e2411 60%, #0a1a0c 100%);
  z-index: 10;
}

.title {
  font-family: "Courier New", monospace;
  font-weight: 900;
  font-size: clamp(36px, 14vw, 76px);
  letter-spacing: 3px;
  color: #7fff3d;
  text-shadow: 3px 3px 0 #0f3006, 0 0 16px rgba(127,255,61,0.35);
  margin: 0;
}

.title.small { font-size: clamp(28px, 10vw, 52px); color: #ff5d5d; text-shadow: 3px 3px 0 #4a0000; }

.subtitle {
  color: #d7ffca;
  font-size: clamp(13px, 4vw, 18px);
  max-width: min(80vw, 420px);
  line-height: 1.5;
  margin: 0;
  font-weight: 600;
}

.bestLine {
  color: #d7ffca;
  font-weight: 800;
  font-size: clamp(13px, 4vw, 16px);
  background: rgba(255,255,255,0.08);
  padding: 6px 14px;
  border-radius: 8px;
  margin: 0;
}

.resultLine {
  color: #d7ffca;
  font-size: clamp(16px, 5vw, 22px);
  font-weight: 800;
  margin: 0;
}

.roast {
  color: #6f9260;
  font-size: clamp(11px, 3.6vw, 14px);
  font-weight: 600;
  font-style: italic;
  margin: 0;
}

.cta-btn {
  margin-top: 8px;
  font-family: inherit;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 1px;
  color: #0a1a0c;
  background: #7fff3d;
  border: none;
  border-radius: 16px;
  padding: 18px 36px;
  box-shadow: 0 6px 0 #4bbf17, 0 8px 18px rgba(0,0,0,0.4);
  animation: pulse 1.1s ease-in-out infinite;
}

.cta-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #4bbf17;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.kbd-hint { display: none; }
@media (hover: hover) and (pointer: fine) {
  .kbd-hint { display: block; }
}
.kbd-hint { color: #d7ffca; font-size: 12px; font-weight: 700; letter-spacing: 1px; margin: 0; opacity: .75; }

.seo-line {
  color: #d7ffca;
  font-size: 12px;
  max-width: min(80vw, 420px);
  line-height: 1.4;
  margin: 0;
  font-weight: 400;
  opacity: .55;
}
