:root {
  --ink: #1d2b36;
  --bg: #f3efe8;
  --card: #fffdf9;
  --line: #d9d2c5;
  --bad: #e3b5ae;
  --ok: #f0dc9e;
  --great: #b3d9b5;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Andika', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}
#app { max-width: 720px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.6rem; margin: 8px 0 16px; }
h2 { font-size: 1.15rem; margin: 24px 0 8px; }
button, .btn {
  font: inherit; color: var(--ink); cursor: pointer;
  border: 2px solid var(--ink); border-radius: 14px;
  background: var(--card); padding: 14px 18px; font-size: 1.1rem;
}
.primary { width: 100%; padding: 22px; font-size: 1.4rem; font-weight: 700; background: #b8cde0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.list { list-style: none; padding: 0; margin: 0; }
.list li {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px;
}
.muted { color: #52606d; font-size: .95rem; }
.msg { padding: 14px; border-radius: 12px; background: #e6d5b8; margin: 12px 0; }
.err { background: #ecc9b8; }

/* Deck */
.deck { position: fixed; inset: 0; display: flex; flex-direction: column; transition: background .25s; }
.deck-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; gap: 8px; }
.deck-top button { padding: 8px 14px; font-size: 1rem; background: rgba(255,255,255,.55); }
.word {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-size: clamp(4rem, 22vw, 16rem); font-weight: 700; text-align: center;
  padding: 0 16px; word-break: break-word; line-height: 1.1;
}
.scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px; }
.scores button { padding: 22px 8px; font-size: clamp(1rem, 3.4vw, 1.6rem); font-weight: 700; }
.s1 { background: var(--bad); } .s2 { background: var(--ok); } .s3 { background: var(--great); }

table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 3px; border: 1px solid var(--ink); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; margin: 8px 0; }
.bar { flex: 1; background: var(--great); border: 1px solid var(--ink); min-height: 2px; }

/* Review */
input[type=text], input[type=date] {
  font: inherit; font-size: 1.1rem; padding: 12px; border: 2px solid var(--ink);
  border-radius: 12px; background: var(--card); color: var(--ink);
}
input[type=text] { flex: 1; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; font-size: 1.15rem; border-radius: 999px; background: #d3c6e6; }
.chip.new { background: #b3d9b5; }
