* { box-sizing: border-box; }
body {
  margin: 0;
  background: #c9b48a;
  color: #243044;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}
main { max-width: 860px; margin: 0 auto; padding: 16px; }
h1 { margin: 0; letter-spacing: 0.04em; }
header p { margin: 4px 0 12px; }
.card, .modal {
  background: #f4efe4;
  border: 4px solid #243044;
  padding: 16px;
}
label { display: block; margin: 10px 0; font-weight: 700; }
input[type="text"], input[type="password"], input:not([type]) {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  font: inherit;
  border: 3px solid #243044;
}
.row { display: flex; gap: 8px; }
button {
  font: inherit;
  font-weight: 700;
  background: #2f6fed;
  color: white;
  border: 3px solid #243044;
  padding: 8px 12px;
  cursor: pointer;
}
button.ghost { background: #efe6cf; color: #243044; }
.check { font-weight: 600; }
.error { color: #8c2f2f; min-height: 1.2em; }
.hidden { display: none !important; }
.hud { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.hud span { background: #f4efe4; border: 3px solid #243044; padding: 6px 8px; font-weight: 700; }
canvas { width: 100%; height: auto; background: #1d2430; border: 4px solid #243044; image-rendering: pixelated; display: block; }
#toast { min-height: 1.4em; font-weight: 700; }
#scores { margin-top: 8px; }
#score-btn.pulse { animation: pulse 0.6s ease 3; }
@keyframes pulse { 50% { background: #d9a441; color: #243044; } }
.modal { position: fixed; inset: 0; margin: auto; max-width: 520px; height: fit-content; z-index: 2; }
.modal p { font-size: 1.15rem; }
.letters { width: 100%; border-collapse: collapse; }
.letters td { border-bottom: 2px solid #243044; padding: 4px 0; }
