:root { color-scheme:light; --ink:#352d2a; --muted:#82766e; --line:#ead9c9; --paper:#fff1e1; --white:#fffefd; --orange:#ef9b4d; --orange-dark:#a95e1c; --green:#9bc95e; --red:#b65e51; }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; background:var(--paper); color:var(--ink); font:15px/1.55 "Segoe UI",Arial,sans-serif; }
.game-shell { width:min(900px,calc(100% - 32px)); margin:auto; }
.topbar { height:75px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); }
.back,.brand { color:var(--ink); text-decoration:none; font-size:12px; font-weight:700; }
.back { color:var(--muted); }
.brand { display:flex; align-items:center; gap:8px; font-size:10px; letter-spacing:.1em; }
.brand b { display:grid; width:25px; height:25px; place-items:center; border-radius:8px 8px 8px 2px; background:var(--ink); color:#ffe3c4; font:italic 16px Georgia,serif; }
.lesson-badge { padding:6px 10px; border:1px solid var(--line); border-radius:99px; color:var(--orange-dark); font:10px Consolas,monospace; }
.heading { padding:35px 0 19px; }
.eyebrow { margin:0 0 7px; color:#a38e7c; font:10px Consolas,monospace; letter-spacing:.15em; }
.heading h1 { margin:0; font-size:clamp(37px,6vw,57px); line-height:1; letter-spacing:-.07em; }
.heading h1 span { color:var(--orange-dark); }
.heading>p:last-child { margin:10px 0 0; color:var(--muted); font-size:13px; }
.panel { width:min(630px,100%); margin:35px auto; padding:33px; border:1px solid var(--line); border-radius:18px; background:var(--white); text-align:center; box-shadow:0 12px 25px #3421130a; }
.loading { color:var(--muted); }
.intro h2,.result h2 { margin:0 0 8px; font-size:25px; letter-spacing:-.05em; }
.intro>p:not(.eyebrow),.result>p:not(.eyebrow) { max-width:480px; margin:0 auto 17px; color:var(--muted); font-size:12px; }
.cat-icon { display:grid; width:58px; height:58px; place-items:center; margin:0 auto 16px; border-radius:18px; background:#ffecd7; font-size:29px; }
.button { display:inline-flex; min-height:44px; align-items:center; justify-content:center; gap:14px; padding:0 18px; border:0; border-radius:10px; background:var(--ink); color:white; font:700 12px "Segoe UI",Arial,sans-serif; text-decoration:none; cursor:pointer; }
.button:hover { transform:translateY(-2px); }
.button:focus-visible,.letter-keys button:focus-visible,input:focus-visible { outline:3px solid var(--orange); outline-offset:3px; }
.button.secondary { border:1px solid var(--line); background:transparent; color:var(--ink); }
.stats { display:flex; gap:9px; align-items:stretch; padding:11px; border:1px solid var(--line); border-radius:13px; background:var(--white); }
.stats>div { display:flex; min-width:72px; flex-direction:column; justify-content:center; padding:0 8px; }
.stats small { color:#8b7e74; font:9px Consolas,monospace; letter-spacing:.08em; }
.stats b { font-size:19px; }
.stats .progress { flex:1; }
.progress small { display:flex; justify-content:space-between; }
.progress i { height:7px; overflow:hidden; margin-top:7px; border-radius:99px; background:#f3e9de; }
.progress i span { display:block; width:0; height:100%; border-radius:inherit; background:var(--green); transition:width .2s; }
.question { margin:17px 0 40px; padding:26px; border:1px solid var(--line); border-radius:18px; background:#fffaf4; text-align:center; }
.small-cat { width:45px; height:45px; margin-bottom:9px; border-radius:15px; font-size:24px; }
.verb-meaning { margin:0; color:var(--muted); font-size:13px; }
.verb-infinitive { margin:0 0 20px; font-size:clamp(27px,5vw,38px); line-height:1.15; letter-spacing:-.05em; }
.tense-label { display:table; margin:-10px auto 17px; padding:3px 12px; border-radius:99px; background:#ffedda; color:var(--orange-dark); font:10px Consolas,monospace; text-transform:capitalize; }
.answer-card { max-width:500px; margin:auto; padding:23px clamp(15px,5vw,42px); border:1px solid #f0e4d8; border-radius:13px; background:var(--white); }
.answer-card .eyebrow { margin:0 0 3px; }
.person-prompt { margin:0 0 14px; font-size:25px; font-weight:750; }
#answer-form { display:flex; flex-direction:column; align-items:center; gap:12px; }
#answer { width:min(100%,340px); min-height:48px; padding:6px 10px; border:0; border-bottom:2px solid #55463e; border-radius:0; background:transparent; color:var(--ink); font:700 21px "Segoe UI",Arial,sans-serif; text-align:center; }
#answer::placeholder { color:#b4a79e; font-size:14px; font-weight:400; }
#answer:disabled { opacity:.75; }
.letter-keys { display:flex; justify-content:center; flex-wrap:wrap; gap:6px; margin:1px auto 2px; }
.letter-keys button { min-width:35px; min-height:36px; padding:0 7px; border:1px solid var(--line); border-radius:8px; background:#fff5eb; color:var(--orange-dark); font:700 16px "Segoe UI",Arial,sans-serif; cursor:pointer; }
.letter-keys button:hover { border-color:var(--orange); background:#ffecd7; }
.feedback { min-height:24px; margin:13px 0 0; color:var(--muted); font-size:12px; }
.feedback.good { color:#55742c; }
.feedback.bad { color:#a44f45; }
.next-button { margin-top:3px; }
.actions { display:flex; justify-content:center; gap:9px; flex-wrap:wrap; margin-top:17px; }
.result { margin-top:45px; }
.result .cat-icon { background:#ffecd7; }
.error { border-color:#e3aaa3; background:#fff1ef; color:#883d37; }
.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; clip-path:inset(50%); }
[hidden] { display:none!important; }
footer { margin:45px 0 20px; padding-top:14px; border-top:1px solid var(--line); color:#91847a; font:9px Consolas,monospace; text-align:center; }
@media(max-width:480px) {
  .game-shell { width:calc(100% - 22px); }
  .topbar { height:65px; }
  .heading { padding-top:27px; }
  .panel { padding:25px 16px; }
  .stats { gap:2px; padding:8px 4px; }
  .stats>div { min-width:53px; padding:0 4px; }
  .stats small,.progress small { font-size:8px; }
  .stats b { font-size:17px; }
  .question { padding:22px 12px; }
  .answer-card { padding:20px 12px; }
}
