/* pron · treino de sons (drill, usado também nas lições) e ferramenta Pronúncia. Celular primeiro; cores só por variáveis. */

/* ===== treino de sons ===== */
.drill{display:grid;gap:16px;width:100%;max-width:620px;margin:0 auto}
.drill-main{display:grid;gap:18px}
.drill .btn svg,.pron .btn svg{width:18px;height:18px;flex:none}
.drill-top{display:flex;align-items:center;gap:12px}
.drill-set{font-size:13px;font-weight:700;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:45%}
.drill-prog{flex:1;min-width:60px;height:8px;border-radius:999px;background:var(--surface-2);overflow:hidden}
.drill-prog>i{display:block;height:100%;background:var(--accent);border-radius:999px;transition:width .25s ease}
.drill-count{font:600 13px var(--f-mono);color:var(--muted);font-variant-numeric:tabular-nums}

.drill-stage{display:grid;justify-items:center;gap:10px;text-align:center;padding:6px 0}
.drill-q{font-size:15px;font-weight:600;color:var(--ink-2)}
.drill-play{width:92px;height:92px;border-radius:50%;border:0;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;box-shadow:var(--shadow);position:relative}
.drill-play svg{width:40px;height:40px}
.drill-play:hover{background:var(--accent-strong)}
.drill-play.on::after{content:"";position:absolute;inset:-6px;border-radius:50%;border:3px solid var(--accent);animation:pulse 1.2s ease-out infinite}
.drill-voice{font-size:12px;color:var(--muted);min-height:18px;max-width:40ch}

/* opções (2 palavras ou 3 categorias) */
.drill-opts{display:grid;gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}
.drill-opts.n3{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.drill-opts.n1,.drill-opts.n4{grid-template-columns:repeat(2,minmax(0,1fr))}
.drill-opt{position:relative;min-height:88px;border:2px solid var(--line);background:var(--surface);color:var(--ink);border-radius:var(--r-lg);padding:14px 8px;display:grid;place-content:center;justify-items:center;gap:4px;text-align:center;transition:border-color .12s,background .12s,opacity .12s;touch-action:manipulation}
.drill-opt b{font-size:24px;font-weight:700;line-height:1.15;overflow-wrap:anywhere}
.drill-opts.n3 .drill-opt b{font-size:21px}
.drill-opt .ipa{font-size:13px}
.drill-ex{font-size:13px;color:var(--muted);overflow-wrap:anywhere}
.drill-opt kbd{position:absolute;top:6px;left:9px;font:600 11px var(--f-mono);color:var(--muted)}
.drill-opt:hover:not(:disabled){border-color:var(--ink-2)}
.drill-opt:disabled{cursor:default}
.drill-opt.say{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.drill-opt.ok{border-color:var(--good);background:color-mix(in srgb,var(--good) 14%,var(--surface))}
.drill-opt.bad{border-color:var(--crit);background:color-mix(in srgb,var(--crit) 12%,var(--surface))}
.drill-opt.dim{opacity:.5}
.drill-opt.dim.say{opacity:1}

/* resposta */
.drill-fb{display:grid;gap:12px}
.drill-fb:empty{display:none}
.drill-msg{display:flex;gap:10px;align-items:flex-start;font-size:15px;line-height:1.45;padding:12px 14px;border-radius:var(--r);border-left:4px solid var(--muted);background:var(--surface-2);color:var(--ink)}
.drill-msg svg{width:20px;height:20px;flex:none;margin-top:1px}
.drill-msg.ok{border-color:var(--good);background:color-mix(in srgb,var(--good) 10%,var(--surface))}
.drill-msg.ok svg{color:var(--good)}
.drill-msg.bad{border-color:var(--crit);background:color-mix(in srgb,var(--crit) 9%,var(--surface))}
.drill-msg.bad svg{color:var(--crit)}
.drill-acts{display:flex;gap:10px;flex-wrap:wrap}
.drill-acts .btn{min-height:46px;flex:1 1 auto}
.drill-next{position:relative;overflow:hidden}
.drill-next.auto::after{content:"";position:absolute;left:0;bottom:0;height:3px;width:0;background:currentColor;opacity:.55;animation:drill-auto var(--auto,1.4s) linear forwards}
@keyframes drill-auto{from{width:0}to{width:100%}}
.drill-keys{font-size:12px;color:var(--muted);text-align:center}
@media (hover:none){.drill-opt kbd,.drill-keys{display:none}}

/* falar */
.drill-word{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap}
.drill-word .big-en{font-size:clamp(34px,10vw,48px);line-height:1.1}
.drill-hint{font-size:14px;color:var(--ink-2);background:var(--surface-2);border-radius:999px;padding:5px 14px}
.drill-vs{font-size:13px;color:var(--muted)}
.drill-mic{margin-top:6px;touch-action:manipulation}
.drill-heard{min-height:22px;max-width:46ch;display:flex;flex-wrap:wrap;gap:6px 8px;justify-content:center;align-items:center}
.drill-cmp{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.drill-cmp .btn{min-height:48px}
.drill-fb>.drill-q{text-align:center}
.drill-sub{display:flex;justify-content:center}
.drill-sub .btn{min-height:40px}

/* fim da rodada */
.drill-end{display:grid;gap:20px}
.drill-endh{font-size:20px;font-weight:700}
.drill-sh{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.drill-cats{display:grid;gap:8px;margin-top:4px}
.drill-cat{display:grid;grid-template-columns:minmax(0,1fr) 72px 36px;gap:10px;align-items:center;font-size:13px;color:var(--ink-2)}
.drill-cat b{text-align:right;font-variant-numeric:tabular-nums;color:var(--ink)}
.drill-confs{display:grid;gap:8px}
.drill-cf{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface);font-size:15px}
.drill-cf p{flex:1}
.drill-x{font:600 12px var(--f-mono);color:var(--muted);flex:none}
.drill-tip>p{font-size:14px;color:var(--ink-2)}

/* ===== ferramenta Pronúncia ===== */
.pron{display:grid;gap:26px}
.pron-intro .tips li b{color:var(--ink)}
.pron-rec{border-color:var(--accent-dim);background:var(--accent-soft)}
.pron-rec .pron-why{color:var(--ink-2)}
.pron-lvh{display:flex;align-items:center;gap:10px}
.pron-grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr))}
.pron-set{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:16px;display:grid;gap:12px;align-content:start}
.pron-set.is-rec{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset}
.pron-sethead{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.pron-label{font-size:19px;font-weight:700;line-height:1.2}
.pron-name{font-size:13px;color:var(--muted);margin-top:2px}
.pron-stat{display:grid;gap:6px;font-size:13px;color:var(--ink-2)}
.pron-statl{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}
.pron-stat .meter{height:6px}
.pron-tip>p{font-size:14px;color:var(--ink-2)}
.pron-btns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.pron-btns .btn{min-height:46px}

/* entonação */
.pron-explain p{color:var(--ink-2);max-width:72ch}
.pron-explain b{color:var(--ink)}
.pron-tgh{font-size:16px;font-weight:700}
.pron-tone{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:12px;display:grid;gap:10px}
.pron-tone.rec{border-color:var(--live)}
.pron-thead{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center}
.pron-thead .en{font-size:16px}
.pron-when{color:var(--muted)}
.pron-arrow{display:inline-grid;justify-items:center;gap:0;font-size:11px;font-weight:600;color:var(--en);min-width:40px}
.pron-arrow svg{width:22px;height:22px}
.pron-arrow.down{color:var(--warn)}
.pron-tact{display:flex;gap:8px;flex-wrap:wrap}
.pron-tact .btn{min-height:44px;flex:1 1 130px}
.pron-tact .btn.danger{background:var(--live);border-color:var(--live);color:#fff}
.pron-tact [data-act="pronToneRec"]:not(.danger) svg{color:var(--live)}
.pron-tres{display:grid;gap:8px}
.pron-tres:empty{display:none}
.pron-curve{background:var(--surface-2);border-radius:var(--r-sm);padding:4px}
.pron-curve .contour{max-height:150px}

@media (min-width:640px){
  .drill-opt{min-height:100px}
  .drill-opt b{font-size:28px}
  .drill-opts.n3 .drill-opt b{font-size:24px}
  .pron-tone{grid-template-columns:minmax(0,1fr) auto;align-items:center}
  .pron-tact{flex-wrap:nowrap}
  .pron-tact .btn{flex:0 0 auto}
  .pron-tres{grid-column:1/-1}
}
@media (prefers-reduced-motion: reduce){.drill-next.auto::after{animation:none}}
