:root { --bg:#f6f3ec; --card:#fff; --ink:#222; --muted:#6b6b6b; --brand:#1a7a4c; --brand2:#f2b705; --red:#c0392b; --line:#e5e0d5; }
* { box-sizing:border-box; }
body { margin:0; font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; background:var(--bg); color:var(--ink); }
.wrap { max-width:880px; margin:0 auto; padding:0 16px; }
header { background:var(--brand); color:#fff; padding:18px 0 0; }
header h1 { margin:0; font-size:26px; }
.sub { opacity:.9; margin:6px 0 12px; }
.tabs { display:flex; gap:8px; padding-bottom:12px; }
.tab { border:0; border-radius:999px; padding:10px 18px; font-size:15px; cursor:pointer; background:rgba(255,255,255,.2); color:#fff; }
.tab.active { background:#fff; color:var(--brand); font-weight:700; }
main { padding:18px 0 40px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px; margin:14px 0; }
h2 { margin:0 0 10px; font-size:19px; }
h3 { margin:16px 0 8px; font-size:16px; }
.muted { color:var(--muted); font-size:14px; }
.banner { border-radius:12px; padding:14px; margin:14px 0; font-weight:600; background:#fff7d6; border:1px solid #ead98a; }
.banner.locked { background:#fdecea; border-color:#f0b4ac; }
.banner.done { background:#e6f4ea; border-color:#a3d9b1; }
button { background:var(--brand); color:#fff; border:0; border-radius:10px; padding:10px 16px; font-size:15px; cursor:pointer; margin:4px 4px 4px 0; }
button.ghost { background:#eee; color:#333; }
button:disabled { opacity:.5; cursor:not-allowed; }
input, select { padding:10px; border:1px solid #ccc; border-radius:10px; font-size:15px; margin:4px 4px 4px 0; }
.progress { background:#eee; border-radius:999px; height:14px; overflow:hidden; }
.progress-fill { background:var(--brand); height:100%; transition:width .3s; }
.q { border:1px solid var(--line); border-radius:12px; padding:12px; margin:10px 0; }
.q p { margin:0 0 8px; font-weight:600; }
.opt { display:block; width:100%; text-align:left; background:#f7f7f7; color:#222; border:1px solid #ddd; margin:5px 0; }
.opt.correct { background:#d9f2e2; border-color:var(--brand); }
.opt.wrong { background:#fbe3e0; border-color:var(--red); }
.explain { background:#f0f7ff; border-left:4px solid #2f6fb2; padding:10px; border-radius:8px; margin-top:8px; font-size:14px; }
.bars { display:flex; gap:6px; align-items:flex-end; height:90px; }
.bar { flex:1; background:var(--brand); border-radius:6px 6px 0 0; min-height:4px; position:relative; }
.bar span { position:absolute; bottom:-18px; left:50%; transform:translateX(-50%); font-size:10px; color:var(--muted); }
.barbox { text-align:center; font-size:12px; }
table { width:100%; border-collapse:collapse; font-size:14px; }
td, th { border-bottom:1px solid var(--line); padding:8px 6px; text-align:left; }
.badge { display:inline-block; border-radius:999px; padding:3px 10px; font-size:12px; font-weight:700; background:#eee; }
.badge.ai { background:#e8f0fe; color:#1a56db; }
.badge.rules { background:#f3e8ff; color:#6b21a8; }
.msg { font-size:14px; min-height:18px; }
.vocab { display:grid; grid-template-columns:1fr 1fr; gap:6px; font-size:14px; }
.vocab div { background:#f7f7f7; border-radius:8px; padding:8px; }
footer { padding:20px 0 30px; text-align:center; }
@media (max-width:600px){ .vocab{ grid-template-columns:1fr; } }
