/* Learner app: built for a ~65-year-old on an iPhone. Large type, high contrast, at most 3 big buttons. */
:root {
  --bg: #fbf8f2; --card: #ffffff; --ink: #1d1b18; --muted: #5d574e; --line: #ddd5c8;
  --accent: #0b6e5f; --accent-ink: #ffffff; --ok: #1f7a36; --ok-bg: #e3f4e6; --bad: #a3361f; --bad-bg: #fbe7e2;
  --soft: #f1ebe0; --focus: #f2b705;
  --r: 22px; --tap: 76px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f; --card: #1f1d18; --ink: #f4efe6; --muted: #c4bcae; --line: #3a362e;
    --accent: #3fb8a3; --accent-ink: #08221d; --ok: #6fd38a; --ok-bg: #173822; --bad: #ff9b85; --bad-bg: #3d1d16;
    --soft: #2a2721;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 500 24px/1.4 -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
  -webkit-text-size-adjust: 100%; overscroll-behavior: none;
}
#app { max-width: 560px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; }
.screen { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 18px 0 24px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.dots { display: flex; gap: 6px; flex-wrap: wrap; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.dot.done { background: var(--accent); }
.dot.now { background: var(--focus); }

h1 { font-size: 38px; line-height: 1.2; margin: 8px 0 0; }
.big { font-size: 46px; font-weight: 750; line-height: 1.15; text-align: center; letter-spacing: .3px; word-break: break-word; }
.en { font-size: 40px; font-weight: 700; text-align: center; color: var(--accent); }
.cue { font-size: 28px; line-height: 1.35; }
.muted { color: var(--muted); font-size: 22px; }
.phon { color: var(--muted); font-size: 26px; text-align: center; }
.situation { background: var(--soft); border-radius: var(--r); padding: 14px 18px; font-size: 24px; }
.note { background: var(--soft); border-left: 8px solid var(--accent); border-radius: 14px; padding: 14px 16px; }
.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 22px 18px; }
.center { text-align: center; }
.grow { flex: 1; }

button {
  font: inherit; font-weight: 700; color: var(--ink); background: var(--card); border: 3px solid var(--line);
  border-radius: var(--r); min-height: var(--tap); padding: 12px 18px; width: 100%; cursor: pointer;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
button:active { transform: scale(.98); }
button:focus-visible { outline: 4px solid var(--focus); outline-offset: 2px; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.huge { min-height: 120px; font-size: 32px; }
button.small { min-height: 56px; font-size: 20px; width: auto; padding: 8px 16px; }
button.choice { font-size: 28px; text-align: left; }
button.right { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
button.wrong { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
button:disabled { opacity: .55; }
.row { display: flex; gap: 12px; }
.row > button { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.tools { display: flex; gap: 10px; }
.tools button { flex: 1; min-height: 64px; font-size: 21px; }

.mic { width: 190px; height: 190px; border-radius: 50%; margin: 6px auto; font-size: 30px; display: grid; place-items: center;
       background: var(--accent); color: var(--accent-ink); border: none; }
.mic.rec { background: var(--bad); color: #fff; animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(163,54,31,.45); } 50% { box-shadow: 0 0 0 26px rgba(163,54,31,0); } }
@media (prefers-reduced-motion: reduce) { .mic.rec { animation: none; } }

.tiles, .answer-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 84px; }
.answer-row { border: 3px dashed var(--line); border-radius: var(--r); padding: 10px; }
.tile { width: auto; min-height: 64px; font-size: 28px; padding: 8px 18px; }

.feedback { font-size: 30px; font-weight: 750; text-align: center; min-height: 42px; }
.feedback.ok { color: var(--ok); } .feedback.bad { color: var(--bad); }
textarea { font: inherit; font-size: 28px; width: 100%; min-height: 150px; border-radius: var(--r); border: 3px solid var(--line);
           padding: 14px; background: var(--card); color: var(--ink); }
.banner { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); background: var(--ink);
          color: var(--bg); padding: 12px 16px; border-radius: 16px; font-size: 20px; text-align: center; display: none; }
.banner.show { display: block; }
.hidden { display: none !important; }
