:root {
  --bg: #f5f2ed;
  --text: #2c2c2c;
  --text-dim: #777;
  --accent: #2c2c2c;
  --accent-text: #f5f2ed;
  --green: #2a7d4f;
  --red: #c0392b;
  --green-bg: #e8f5e9;
  --red-bg: #fdecea;
  --border: #d4d0ca;
  --border-light: #e8e4de;
  --radius: 8px;
  --radius-sm: 4px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-mono: "SF Mono", "Fira Code", monospace;
  --max-width: 640px;
}

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

html {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
}

input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

input[type="text"],
input[type="search"] {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: white;
  color: var(--text);
  width: 100%;
  font-size: 1rem;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(44, 44, 44, 0.1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px var(--spacing-sm);
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-sm);
}

.tag-sound { background: #e3f2fd; color: #1565c0; }
.tag-vocab { background: #f3e5f5; color: #7b1fa2; }
.tag-grammar { background: #e8f5e9; color: #2e7d32; }
.tag-phrase { background: #fff3e0; color: #e65100; }
.tag-test { background: #fce4ec; color: #c62828; }
.tag-review { background: #fff9c4; color: #f57f17; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
