@font-face {
  font-family: Laserian;
  src: url('../fonts/LASER4.TTF') format('truetype');
  font-display: swap;
}

.pcg-score-host { position: relative; }

/* The score dialog is shared by the canvas games and the newer HTML games. */
#score-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  justify-content: normal;
  place-items: center;
  padding: 16px;
  background: #201727aa;
  backdrop-filter: blur(3px);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
  color-scheme: dark;
  text-align: left;
  line-height: normal;
  text-transform: none;
  text-shadow: none;
  cursor: auto;
  touch-action: auto;
}
#score-screen, #score-screen * { box-sizing: border-box; letter-spacing: 0; line-height: normal; text-shadow: none; font-synthesis: none; }
#score-screen[hidden], #score-screen [hidden] { display: none !important; }
#score-screen .score-dialog {
  width: min(430px, 100%);
  max-width: 430px;
  max-height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 18px 22px;
  border: 2px solid #80ff00;
  border-radius: 6px;
  background: #051b13f7;
  color: #fff;
  text-align: left;
  box-shadow: 0 0 28px #69dc0020;
  overscroll-behavior: contain;
}
#score-screen #score-title {
  margin: 0 0 14px;
  font-family: Laserian, Arial, sans-serif;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  color: #c4ff85;
}
#score-screen #score-title.game-over { color: #ff2929; }
#score-screen #run-summary { display: grid; gap: 6px; text-align: center; margin: 0 0 14px; }
#score-screen #run-summary > span,
#score-screen #score-form > label { font-family: Laserian, Arial, sans-serif; font-size: 12px; }
#score-screen #final-score { font-family: Laserian, Arial, sans-serif; font-size: 28px; font-weight: bold; }
#score-screen #run-details { font-size: 12px; color: #b8d0bf; }
#score-screen #run-details:empty { display: none; }
#score-screen #score-form { margin: 0; text-align: center; }
#score-screen #score-form > label { display: block; margin-bottom: 5px; }
#score-screen .name-row { display: flex; gap: 8px; }
#score-screen #player-name {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  height: 40px;
  padding: 1px 2px;
  text-transform: uppercase;
  text-align: center;
  background: #06100b;
  border: 1px solid #c7ffb1;
  border-radius: 3px;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 23px;
  line-height: normal;
  user-select: text;
}
#score-screen #top10-label {
  font-family: Laserian, Arial, sans-serif;
  font-size: 17px;
  font-weight: bold;
  text-align: center;
  color: #83ff00;
  margin: 12px 0 8px;
}
#score-screen #leaderboard { list-style: none; padding: 0; margin: 0; }
#score-screen #leaderboard li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 25px;
  padding: 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #a9e99915;
  border-radius: 0;
  background: none;
  color: #e2ffbf;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}
#score-screen #leaderboard .rank { color: #99b9a6; font-size: 12px; }
#score-screen #leaderboard .name { text-align: left; overflow-wrap: anywhere; }
#score-screen #leaderboard .entry-score { text-align: right; font-variant-numeric: tabular-nums; }
#score-screen #score-status { font-size: 11px; min-height: 13px; text-align: center; color: #bbd6c1; margin: 12px 0; }
#score-screen .primary {
  width: 100%;
  min-height: 44px;
  border: 2px solid #d9ffc0;
  border-radius: 5px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: Laserian, Arial, sans-serif;
  font-size: 17px;
  font-weight: normal;
  line-height: normal;
  text-align: center;
  background: #65cf00;
  color: #fff;
  text-shadow: 1px 1px 0 #193e00, -1px -1px 0 #193e00;
  box-shadow: 0 3px 0 #244d16;
  cursor: pointer;
  touch-action: manipulation;
}
#score-screen .primary:hover { background: #7be215; }
#score-screen .primary:disabled { opacity: .55; cursor: wait; }
#score-screen :focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
#score-screen .name-row .primary { width: 44px; min-width: 44px; min-height: 40px; flex: 0 0 44px; padding: 5px; }
#score-screen button svg { width: 22px; height: 22px; flex: none; }

@media (max-width: 650px), (max-height: 650px) {
  #score-screen { padding: 12px; }
  #score-screen .score-dialog { max-height: calc(100svh - 24px); }
}
