html, body {
  margin: 0;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  width: 100%;
  height: 100%;
  background: #0e0817;
  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: #0e0817;
}

.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: 4px;
  z-index: 4;
  pointer-events: none;
  color: #f2dcff;
  text-shadow: 2px 2px 0 #000;
}

#turnLabel {
  font-size: clamp(13px, 4.2vw, 18px);
  font-weight: 900;
  color: #c13cff;
  letter-spacing: 1px;
}

#best {
  font-size: clamp(11px, 3.4vw, 15px);
  color: #e8c8ff;
  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, #150a24 0%, #200f38 60%, #150a24 100%);
  z-index: 10;
}

.title {
  font-family: "Courier New", monospace;
  font-weight: 900;
  font-size: clamp(30px, 10.5vw, 60px);
  letter-spacing: 2px;
  color: #c13cff;
  text-shadow: 3px 3px 0 #2e0a45, 0 0 16px rgba(193,60,255,0.4);
  margin: 0;
}

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

.titlePreview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 6vw, 28px);
  margin: 0;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,0.4));
}

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

.bestLine {
  color: #e8c8ff;
  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: #e8c8ff;
  font-size: clamp(16px, 5vw, 22px);
  font-weight: 800;
  margin: 0;
}

.roast {
  color: #8a7096;
  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: #1a0a2b;
  background: #c13cff;
  border: none;
  border-radius: 16px;
  padding: 18px 36px;
  box-shadow: 0 6px 0 #7a17a8, 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 #7a17a8;
}

@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: #e8c8ff; font-size: 12px; font-weight: 700; letter-spacing: 1px; margin: 0; opacity: .75; }
