:root {
  --bg: #f7f5f0;
  --card: #ffffff;
  --ink: #1d1d1f;
  --muted: #6b6b70;
  --accent: #1f3a5f;
  --positive: #2e7d4f;
  --negative: #a23b2c;
  --neutral: #6b6b70;
  --line: #e2dfd7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
}

h1 { font-size: 1.5rem; margin: 8px 0 16px; }
h2 { font-size: 1.1rem; margin: 20px 0 8px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
}

.word {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: var(--accent);
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 4px 0 12px;
}

.badge {
  display: inline-block;
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  margin-right: 4px;
}
.badge.positive { color: var(--positive); }
.badge.negative { color: var(--negative); }
.badge.neutral { color: var(--neutral); }

ul.examples { padding-left: 18px; margin: 6px 0 0; }
ul.examples li { margin-bottom: 6px; }

button, .button {
  font: inherit;
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  min-height: 44px;
}
button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
button.wide { width: 100%; margin-top: 8px; }
button:disabled { opacity: 0.5; cursor: default; }

.options { display: grid; gap: 8px; margin-top: 12px; }
.options button {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  text-align: left;
}
.options button.correct { background: #e3f3e9; border-color: var(--positive); }
.options button.wrong { background: #f7e1dd; border-color: var(--negative); }

.feedback { margin-top: 10px; font-weight: 600; }
.feedback.right { color: var(--positive); }
.feedback.wrong { color: var(--negative); }

label { display: block; font-size: 0.9rem; margin-bottom: 12px; color: var(--muted); }
input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  font: inherit;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 72px; }

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.list-item .actions { display: flex; gap: 6px; }
.list-item .actions button { padding: 6px 10px; min-height: 36px; font-size: 0.85rem; }

.status { font-size: 0.8rem; color: var(--muted); }
.error { color: var(--negative); margin: 8px 0; }

.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs button {
  background: transparent;
  color: var(--muted);
  border-radius: 0;
  min-height: 56px;
}
.tabs button[aria-current="page"] { color: var(--accent); font-weight: 700; }

.reviewed { color: var(--positive); font-weight: 600; margin: 4px 0 8px; }
