:root {
  --bg: #000000;
  --text: #ffffff;
  --subtle: #d8dbe0;
  --safe: 24px;
  --font-ui: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/poppins-400.ttf") format("truetype");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/poppins-600.ttf") format("truetype");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/poppins-700.ttf") format("truetype");
}

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/playfair-display-700.ttf") format("truetype");
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 600px;
  height: 600px;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
}

body {
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}

#app {
  width: 100%;
  height: 100%;
  padding: var(--safe);
  display: grid;
  grid-template-rows: minmax(48px, auto) 1fr minmax(22px, auto);
  align-items: center;
  justify-items: center;
  text-align: center;
  background: var(--bg);
}

.top-labels,
.state-label,
.hint-text {
  margin: 0;
  max-width: 520px;
}

.top-labels {
  align-self: start;
  display: grid;
  gap: 4px;
  color: var(--subtle);
}

.app-title,
.state-label,
.hint-text {
  margin: 0;
  color: var(--subtle);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 600;
}

.app-title {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.app-version {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--subtle);
  vertical-align: 0.25em;
}

.hint-text {
  align-self: end;
}

.game-text {
  margin: 0;
  width: 100%;
  max-width: 528px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(34px, 8.5vw, 52px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 599px), (max-height: 599px) {
  html,
  body {
    width: 100vw;
    height: 100vh;
  }

  #app {
    padding: 18px;
  }

  .game-text {
    font-size: clamp(30px, 8.2vw, 46px);
  }

  .app-title,
  .state-label,
  .hint-text {
    font-size: 16px;
  }

  .app-title {
    font-size: 18px;
  }
}
