:root {
  --text: #f2f4ff;
  --dim: #9aa3cc;
  --accent: #4de3c1;
  --cake: #ffd166;
  --panel: rgba(13, 16, 48, 0.82);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: #0d1030;
  color: var(--text);
  font-family: ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
  touch-action: manipulation;
}

#c {
  position: fixed;
  inset: 0;
  display: block;
}

#overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px
           calc(env(safe-area-inset-bottom, 0px) + 16px);
  background: rgba(8, 10, 30, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

#overlay.hidden, .hidden { display: none !important; }

.panel {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 26px 22px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.09);
  text-align: center;
}

#menu-face {
  width: 150px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.55));
}

h1 { font-size: 27px; line-height: 1.15; font-weight: 800; }
h2 { font-size: 23px; font-weight: 700; }
#menu-sub { color: var(--dim); font-size: 16px; margin-top: -6px; }

#over-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--cake);
}
#over-score b { font-size: 52px; font-weight: 800; line-height: 1; }
#over-score small { font-size: 15px; color: var(--dim); }
#over-best { color: var(--dim); font-size: 15px; }

button {
  font: inherit;
  font-weight: 700;
  font-size: 18px;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 15px;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
}
button:active { transform: scale(0.97); filter: brightness(1.1); }

.primary {
  margin-top: 4px;
  background: linear-gradient(180deg, var(--accent), #2bbf9f);
  color: #06231d;
}

.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.22);
  min-height: 46px;
  font-size: 16px;
}

.hint {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.4;
  min-height: 1em;
}
