:root {
  --bg: #050805;
  --card: #0d140d;
  --card2: #142014;
  --line: #1f3a1f;
  --neon: #39ff14;
  --neon-dim: #1f8f0c;
  --text: #e8ffe0;
  --muted: #8fb38a;
  --bad: #ff4d6d;
  --warn: #ffc94d;
  --radius: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { min-height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(5,8,5,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; letter-spacing: 1px; flex: 1; }
.brand span { color: var(--neon); }
.stats { display: flex; gap: 12px; font-size: 14px; color: var(--muted); }
.back { background: none; border: 0; color: var(--neon); font-size: 32px; line-height: 1; padding: 0 6px 4px 0; }
main { padding: 16px; max-width: 640px; margin: 0 auto; }
h1 { font-size: 24px; margin: 6px 0 4px; }
h2 { font-size: 19px; margin: 18px 0 8px; }
p.sub { color: var(--muted); margin: 0 0 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.tile { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; color: var(--text); font: inherit; }
.tile:active { background: var(--card2); }
.tile .ico { font-size: 28px; width: 40px; text-align: center; }
.tile .t { font-weight: 700; }
.tile .d { color: var(--muted); font-size: 14px; }
.tile .m { margin-left: auto; color: var(--neon); font-size: 14px; white-space: nowrap; }
.tile.done { border-color: var(--neon-dim); }
.tile.done .m::before { content: "✓ "; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--neon); background: var(--neon); color: #031003; font: 700 16px system-ui, sans-serif; }
.btn.ghost { background: transparent; color: var(--neon); }
.btn.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .4; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > .btn { flex: 1; }
.word { font-size: 38px; font-weight: 800; text-align: center; margin: 10px 0 2px; }
.trans { font-size: 22px; text-align: center; color: var(--neon); min-height: 32px; }
.ex { text-align: center; color: var(--muted); margin: 8px 0 14px; }
.speak { background: var(--card2); border: 1px solid var(--line); color: var(--neon); border-radius: 999px; width: 52px; height: 52px; font-size: 22px; display: inline-flex; align-items: center; justify-content: center; }
.center { text-align: center; }
.opts { display: grid; gap: 10px; margin-top: 12px; }
.opt { background: var(--card2); border: 1px solid var(--line); color: var(--text); border-radius: 14px; padding: 14px; font: inherit; text-align: left; }
.opt.ok { border-color: var(--neon); background: #0f2e0a; }
.opt.no { border-color: var(--bad); background: #2e0a12; }
.progress { height: 6px; background: var(--card2); border-radius: 99px; overflow: hidden; margin: 6px 0 14px; }
.progress > div { height: 100%; background: var(--neon); transition: width .3s; }
.sent { padding: 10px 0; border-bottom: 1px solid var(--line); }
.sent:last-child { border-bottom: 0; }
.sent .en { font-size: 19px; }
.sent .en .w { border-bottom: 1px dotted var(--neon-dim); cursor: pointer; }
.sent .es { color: var(--muted); font-size: 15px; display: none; margin-top: 4px; }
.sent.show .es { display: block; }
.sent .tools { display: flex; gap: 8px; margin-top: 6px; }
.chip { font-size: 13px; padding: 6px 10px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); color: var(--muted); }
.pop { position: fixed; left: 16px; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); background: var(--card2); border: 1px solid var(--neon); border-radius: 14px; padding: 12px 16px; z-index: 20; font-size: 17px; }
.pop b { color: var(--neon); }
.mic { width: 84px; height: 84px; border-radius: 50%; font-size: 34px; border: 2px solid var(--neon); background: var(--card2); color: var(--neon); }
.mic.on { background: var(--neon); color: #031003; animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 14px rgba(57,255,20,.15); } }
.score { font-size: 42px; font-weight: 800; text-align: center; }
.diff .ok { color: var(--neon); }
.diff .no { color: var(--bad); text-decoration: line-through; }
.chat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 150px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; }
.msg.ai { background: var(--card2); border: 1px solid var(--line); align-self: flex-start; }
.msg.me { background: #103a0a; align-self: flex-end; }
.msg .fix { margin-top: 6px; font-size: 14px; color: var(--warn); }
.msg .tr { margin-top: 6px; font-size: 14px; color: var(--muted); display: none; }
.msg.showtr .tr { display: block; }
.composer { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(5,8,5,.96); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 8px; align-items: center; }
.composer input { flex: 1; min-height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 0 14px; font: inherit; }
.composer .mic { width: 52px; height: 52px; font-size: 22px; }
.note { font-size: 14px; color: var(--muted); }
.level { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.big-num { font-size: 30px; font-weight: 800; color: var(--neon); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.timer { font-variant-numeric: tabular-nums; color: var(--neon); }
