:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --success: #16a34a;
  --error: #dc2626;
  --border: #e5e7eb;
  --radius: 0.5rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.app {
  max-width: 720px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}

header p {
  margin: 0;
  color: var(--muted);
}

#prompt-section {
  margin-top: 1.25rem;
}

#prompt-text {
  font-size: 1.125rem;
  font-weight: 600;
}

#hint-text {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

#build-section {
  margin-top: 1.25rem;
}

#sentence-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
}

.slot {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #eef2ff;
  cursor: pointer;
  font: inherit;
}

.slot:hover {
  background: #e0e7ff;
}

#word-bank {
  margin-top: 1.25rem;
}

#word-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.word {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  font: inherit;
}

.word:hover {
  background: #f3f4f6;
}

#controls {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.5rem;
}

#controls button {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: white;
  font: inherit;
  cursor: pointer;
}

#controls button:hover {
  background: var(--accent-hover);
}

#feedback {
  margin-top: 1rem;
  font-weight: 600;
  min-height: 1.5rem;
}

#feedback.success {
  color: var(--success);
}

#feedback.error {
  color: var(--error);
}
