@font-face {
  font-family: "Lilita One";
  src: url("LilitaOne-Regular.ttf") format("truetype");
  font-display: block;
}

:root {
  --sky: #2c9eec;
  --sea: #30b9fc;
  --gold: #f4d210;
  --grass: #25d315;
  --ink: #080808;
  --heart: #f80234;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--sky);
  color: #fff;
  font: 20px/1.3 "Lilita One", system-ui, sans-serif;
  letter-spacing: 0.02em;
}

/* The game fills the window; Unity matches its render size to this. */
#game {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  outline: none;
  background: var(--sky);
}

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px;
  text-align: center;
}
.screen[hidden] { display: none; }

#front, #loading {
  background:
    radial-gradient(ellipse 22% 9% at 18% 22%, #fff 98%, transparent 100%),
    radial-gradient(ellipse 14% 7% at 27% 18%, #fff 98%, transparent 100%),
    radial-gradient(ellipse 20% 8% at 82% 30%, #fff 98%, transparent 100%),
    radial-gradient(ellipse 12% 6% at 75% 26%, #fff 98%, transparent 100%),
    linear-gradient(to bottom, var(--sky) 0%, var(--sky) 72%, var(--sea) 72%, var(--sea) 100%);
}

/* Ink outline on white, like the menu's title. */
h1, .status, .playing, .play, label {
  color: #fff;
  text-shadow:
    -3px -3px 0 var(--ink), 3px -3px 0 var(--ink), -3px 3px 0 var(--ink), 3px 3px 0 var(--ink),
    0 -3px 0 var(--ink), 0 3px 0 var(--ink), -3px 0 0 var(--ink), 3px 0 0 var(--ink);
}

h1 {
  margin: 0 0 4px;
  font-size: clamp(72px, 14vw, 168px);
  font-weight: normal;
  line-height: 1;
  text-transform: uppercase;
  text-shadow:
    -6px -6px 0 var(--ink), 6px -6px 0 var(--ink), -6px 6px 0 var(--ink), 6px 6px 0 var(--ink),
    0 -6px 0 var(--ink), 0 6px 0 var(--ink), -6px 0 0 var(--ink), 6px 0 0 var(--ink);
}

.playing {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 26px;
}
.playing[hidden] { display: none; }
.dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--grass);
  border: 3px solid var(--ink);
}
.playing.full .dot { background: var(--heart); }

.name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
label { font-size: 24px; }
#name {
  width: 15ch;
  padding: 8px 14px;
  border: 4px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 24px;
  text-align: center;
}
#name:focus { outline: 4px solid var(--gold); }

button {
  font: inherit;
  cursor: pointer;
}
#reroll, .small {
  border: 4px solid var(--ink);
  border-radius: 14px;
  background: var(--gold);
  color: var(--ink);
  font-size: 24px;
  padding: 6px 14px;
}

/* ButtonGrass from the UI kit, with its label sitting on the green top. */
.play {
  width: min(440px, 80vw);
  aspect-ratio: 1024 / 202;
  border: 0;
  padding: 0 0 2.5%;
  background: url("play.webp") center / 100% 100% no-repeat;
  font-size: clamp(34px, 6vw, 52px);
  text-transform: uppercase;
  transition: transform 0.08s;
}
.play:hover:not(:disabled) { transform: scale(1.04); }
.play:active:not(:disabled) { transform: scale(0.98); }
.play:disabled { filter: grayscale(1) brightness(0.9); cursor: default; }

.note {
  margin: 0;
  font-family: system-ui, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
  color: var(--ink);
}
.note[hidden] { display: none; }

.status { margin: 0; font-size: 34px; max-width: 30ch; }
.hint { margin: 0; font-size: 20px; color: #fff; opacity: 0.9; }
.hint[hidden], .small[hidden] { display: none; }

/* BarFrame from the UI kit, filled in the kit's two grass greens. */
.bar {
  position: relative;
  width: min(480px, 80vw);
  aspect-ratio: 768 / 128;
  background: url("bar-frame.png") center / 100% 100% no-repeat;
}
.bar-fill {
  position: absolute;
  left: 4.4%;
  top: 26%;
  height: 48%;
  width: 0;
  max-width: 91.2%;
  border-radius: 999px;
  background: linear-gradient(to bottom, #25d315 62%, #1cb10d 62%);
  transition: width 0.15s;
}

/* Over the running game: dim it, keep it visible. */
.overlay {
  background: rgba(8, 8, 8, 0.45);
  cursor: pointer;
}
.overlay.waiting { cursor: default; }
