* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f5f5f5;
  color: #1a1a1a;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ---- Screens ---- */

.screen {
  width: 100%;
  max-width: 480px;
  padding: 2rem 1.5rem;
}

.hidden { display: none; }

/* ---- Setup screen ---- */

h1 {
  font-size: 1.4rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.6rem;
  letter-spacing: -0.02em;
}

fieldset {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.8rem 1rem 1rem;
  margin-bottom: 1rem;
}

legend {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #777;
  padding: 0 0.4rem;
}

.checkbox-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.checkbox-grid.row {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.checkbox-grid input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #1a1a1a;
}

/* ---- Buttons ---- */

.btn {
  display: block;
  width: 100%;
  padding: 0.7rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.btn.primary {
  background: #1a1a1a;
  color: #fff;
}
.btn.primary:hover { background: #333; }

.btn.secondary {
  background: #e8e8e8;
  color: #1a1a1a;
}
.btn.secondary:hover { background: #ddd; }

.btn.link {
  background: none;
  color: #888;
  font-size: 0.85rem;
  margin-top: 0.4rem;
}
.btn.link:hover { color: #555; }

.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* ---- Practice screen ---- */

#card {
  text-align: center;
  padding: 3rem 1rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  margin-bottom: 1rem;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#prompt {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.4;
}

#prompt.hidden-text {
  color: #bbb;
  font-weight: 400;
  font-style: italic;
}

#prompt.revealed {
  color: #1a1a1a;
}

#answer {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2e7d32;
  margin-top: 1rem;
  min-height: 2.4rem;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.card-actions .btn {
  flex: 1;
  font-size: 0.9rem;
  padding: 0.65rem 0.4rem;
}

#mainBtn {
  margin-bottom: 0.2rem;
}
