:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #fff;
  --accent-correct: #4ade80;
  --accent-wrong: #f87171;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, "PingFang TC", "Heiti TC",
    "Microsoft JhengHei", sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

#screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: max(env(safe-area-inset-top), 24px)
    max(env(safe-area-inset-right), 24px)
    max(env(safe-area-inset-bottom), 24px)
    max(env(safe-area-inset-left), 24px);
  text-align: center;
  cursor: pointer;
  transition: background-color 200ms ease;
}

#screen.correct {
  background: #052e1a;
}

#screen.wrong {
  background: #2e0a0a;
}

#display {
  font-size: clamp(28px, 6vw, 56px);
  line-height: 1.4;
  font-weight: 600;
  white-space: pre-wrap;
  max-width: 100%;
  word-break: break-word;
}

#hint {
  position: absolute;
  bottom: max(env(safe-area-inset-bottom), 16px);
  left: 0;
  right: 0;
  font-size: 14px;
  opacity: 0.4;
  letter-spacing: 0.1em;
}
