#title-screen {
  position: absolute; inset: 0; z-index: 10;
  background: #1b1840 center / cover no-repeat;
  image-rendering: pixelated;
  font-family: var(--font);
  transition: opacity 0.3s ease;
  overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
#title-screen.fade-out { opacity: 0; pointer-events: none; }
body.pre #hud, body.pre #panel, body.pre #tabbar { visibility: hidden; }

#title-screen .logo-wrap {
  position: absolute; top: 6%; left: 50%;
  width: 80%; max-height: 30%;
  transform: translateX(-50%);
  animation: logo-drop 0.6s cubic-bezier(.3, 1.5, .5, 1) both;
  pointer-events: none;
}
#title-screen .logo-wrap::before { content: ""; display: block; }
#title-screen .logo {
  display: block; width: 100%; max-height: 30vh; object-fit: contain; margin: 0 auto;
  animation: logo-float 3s ease-in-out 0.6s infinite;
}
#title-screen .logo-shine {
  position: absolute; inset: 0;
  -webkit-mask-image: var(--logo); mask-image: var(--logo);
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center top; mask-position: center top;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.85) 50%, transparent 65%) -150% 0 / 250% 100% no-repeat;
  animation: logo-shine 3.2s ease-in-out 1s infinite;
}
@keyframes logo-drop { from { transform: translate(-50%, -140%); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes logo-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes logo-shine { 0% { background-position: 150% 0; } 60%, 100% { background-position: -150% 0; } }

#title-screen .start-prompt {
  position: absolute; left: 24px; right: 24px; bottom: 14%;
  text-align: center; padding: 8px 0;
  background: linear-gradient(90deg, transparent, rgba(13, 11, 30, 0.75) 20%, rgba(13, 11, 30, 0.75) 80%, transparent);
  font-size: 22px; line-height: 1.3; color: #fff1d6;
  text-shadow: -2px 0 #0d0b1e, 2px 0 #0d0b1e, 0 -2px #0d0b1e, 0 2px #0d0b1e, -2px -2px #0d0b1e, 2px -2px #0d0b1e, -2px 2px #0d0b1e, 2px 2px #0d0b1e, 3px 4px 0 #0d0b1e;
  animation: prompt-pulse 1.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes prompt-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(1.03); } }

#title-screen .trophy-btn {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: #ffb84d; border: 3px solid #0d0b1e; border-radius: 8px;
  box-shadow: inset 0 -4px 0 #ff8a2a, 0 3px 0 #0d0b1e;
  cursor: pointer;
}
#title-screen .trophy-btn img { width: 28px; height: 28px; image-rendering: pixelated; pointer-events: none; }
#title-screen .trophy-btn:active { transform: translateY(2px) scale(0.94); }
