/* Uses the project palette from variables.css. Don't redefine --color-*
   tokens here; change them in variables.css instead. */

/* Self-hosted Nunito (shipped with the game build, no CDN). */
@font-face {
  font-family: 'Nunito';
  src: url('/game/fonts/nunito-latin.woff2') format('woff2');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-ui);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 15%, var(--color-accent-20), transparent 45%),
    radial-gradient(circle at 85% 80%, var(--color-secondary-20), transparent 40%),
    var(--color-bg);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.brand .lantern {
  font-size: 32px;
  line-height: 1;
}

.brand span {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.01em;
}

h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
}

.lead {
  margin: 0 0 24px;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.5;
}

h2 {
  margin: 32px 0 12px;
  font-size: 15px;
  font-weight: 800;
  color: var(--color-text-muted);
}

label {
  display: block;
  margin-bottom: 16px;
}

label span {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 16px;
}

input:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 1px;
}

small {
  display: block;
  margin-top: 6px;
  color: var(--color-text-muted);
  font-size: 13px;
}

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  background: var(--color-primary);
  color: var(--color-on-primary);
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

button:hover, .button:hover {
  background: var(--color-primary-hover);
}

button:active { transform: translateY(1px); }

button:focus-visible, .button:focus-visible, a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

button.ghost, .button.ghost {
  width: auto;
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  font-weight: 700;
  font-size: 14px;
}

button.ghost:hover, .button.ghost:hover {
  background: var(--color-hover);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.msg {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.msg.ok {
  background: var(--color-primary-20);
  color: var(--color-success);
}

.msg.error, .error {
  background: var(--color-error-bg);
  color: var(--color-error);
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.muted {
  margin-top: 24px;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

code {
  font-family: var(--font-code);
  font-size: 12px;
  background: var(--color-bg);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
}

section { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
