/* Motor de idiomas: responsive.css. Desktop largo (barra lateral) e movimento reduzido. Sempre o ÚLTIMO CSS:
   sobrescreve regras de mesma especificidade das outras folhas. */
/* ---------- desktop largo: barra lateral ---------- */
.side-goal { display: none; }
@media (min-width: 1024px) {
  #app { max-width: 720px; }
  #app:has(> .tabbar) { max-width: none; margin: 0; padding-left: 296px; box-shadow: none; background: var(--bg); }
  #app:has(> .tabbar)::before { content: ""; position: fixed; z-index: 4; top: 0; bottom: 0; left: 0; width: 296px; background: var(--card); border-right: 1px solid var(--line); }
  #app:has(> .tabbar) > .home, #app:has(> .tabbar) > .page { width: 100%; max-width: 760px; margin: 0 auto; padding: 36px 40px 64px; }
  #app:has(> .tabbar) > .topbar {
    position: fixed; z-index: 6; top: 0; left: 0; width: 296px; flex-wrap: wrap; gap: 8px 6px; padding: 28px 24px 0;
    background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  #app:has(> .tabbar) > .topbar .logo { flex-basis: 100%; margin: 0 0 10px; font-size: 26px; }
  #app:has(> .tabbar) > .topbar .logo::before { width: 36px; height: 36px; border-radius: 11px; background-size: 24px; }
  .side-goal { display: flex; align-items: center; gap: 12px; flex-basis: 100%; margin-top: 10px; padding: 12px 14px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); }
  .side-goal .ring, .side-goal .ring svg { width: 52px; height: 52px; }
  .side-goal .ring span { font-size: 16px; }
  .side-goal b { display: block; font-family: var(--font-display); font-size: 15px; }
  .side-goal small { color: var(--ink-2); font-size: 13px; }
  #app:has(> .tabbar) > .tabbar {
    top: 236px; bottom: auto; left: 0; right: auto; width: 296px; max-width: none; margin: 0; padding: 0 16px;
    background: none; border: 0; box-shadow: none;
  }
  .tabbar .inner { flex-direction: column; gap: 4px; }
  .tabbar button { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 50px; padding: 0 12px; border-radius: 14px; font-size: 15.5px; }
  .tabbar .ic { width: 34px; height: 34px; border-radius: 10px; }
  .tabbar button:hover { background: var(--bg); }
  .tabbar button:hover .ic { background: none; }
  .tabbar button.on { background: var(--tint); }
  .tabbar button.on .ic { background: none; }
  .home .goal-card { display: none; }
  .home .goal-card + .level-head { margin-top: 0; }
  .stage { padding: 36px 32px 40px; }
  .lesson-top { padding: 14px 24px 10px 14px; }
  .foot { padding: 16px 32px 20px; }
  .foot .row .btn.ghost { min-width: 140px; }
  .foot > .btn.block, .foot .row { max-width: 100%; }
}

/* ---------- movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- desktop largo: lição em duas colunas (mascote e placar à esquerda, exercício maior à direita) ---------- */
@media (min-width: 1024px) {
  #app:has(> .lesson.lx) { max-width: 1160px; }
  .lesson.lx {
    display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: auto 1fr auto;
    grid-template-areas: "top top" "side stage" "foot foot";
  }
  .lesson.lx > .lesson-top { grid-area: top; padding: 18px 48px 12px 28px; }
  .lesson.lx > .lx-side { grid-area: side; display: block; padding: 36px 0 28px 40px; }
  .lesson.lx > .stage { grid-area: stage; width: 100%; max-width: 820px; padding: 40px 56px 48px 44px; }
  .lesson.lx > .foot { grid-area: foot; padding: 18px 96px 22px 344px; }
  .lx-side-card {
    position: sticky; top: 96px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 18px 18px;
    border-radius: 24px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  }
  .lx-side-say {
    position: relative; align-self: stretch; padding: 12px 14px; border-radius: 16px; background: var(--tint);
    color: var(--ink-2); font-size: 14.5px; line-height: 1.45; animation: rise .25s ease-out both;
  }
  .lx-side-say::after {
    content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; margin-left: -7px;
    background: var(--tint); transform: rotate(45deg); border-radius: 0 0 3px 0;
  }
  .lx-side-say b { display: block; margin-bottom: 2px; font-family: var(--font-display); font-size: 19px; line-height: 1.2; color: var(--primary-ink); }
  .lx-side-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; }
  .lx-side-kpis span { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 2px 7px; border-radius: 13px; background: var(--bg); }
  .lx-side-kpis .ico { width: 17px; height: 17px; color: var(--primary-ink); stroke-width: 2.4; }
  .lx-side-kpis span:nth-child(2) .ico { color: var(--flame); fill: var(--flame); stroke-width: 1.6; }
  .lx-side-kpis b { font-family: var(--font-display); font-size: 18px; line-height: 1.2; font-variant-numeric: tabular-nums; }
  .lx-side-kpis small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
  /* escala maior no desktop */
  .lesson.lx .stage > div > h2, .lesson.lx .stage h2 { font-size: 31px; }
  .lesson.lx .stage .ask-b h2 { font-size: 31px; }
  .lesson.lx .ask .ask-m { display: none; }
  .lesson.lx .ask-b { padding: 0; background: none; border: 0; box-shadow: none; }
  .lesson.lx .ask-b::before { display: none; }
  .lesson.lx .opt { min-height: 76px; font-size: 21px; }
  .lesson.lx .opt .k { width: 34px; height: 34px; font-size: 14px; }
  .lesson.lx .opts.glyphs .opt { min-height: 160px; font-size: 72px; }
  .lesson.lx .prompt-en { font-size: 23px; }
  .lesson.lx .sentence { font-size: 25px; }
  .lesson.lx .tile { min-height: 54px; font-size: 19px; }
  .lesson.lx textarea.in { font-size: 20px; }
  .lesson.lx .match .opt { min-height: 70px; font-size: 18px; }
  .lesson.lx .teach-card p, .lesson.lx .tip-body p { font-size: 19px; }
  /* leitor de história: coluna mais larga e texto maior */
  #app:has(> .lesson.story) { max-width: 900px; }
  .lesson.story > .stage { padding: 32px 48px 40px; }
  .lesson.story .sline .txt { font-size: 20px; }
  .lesson.story .story-q h2 { font-size: 24px; }
  .lesson.story .opt { min-height: 64px; font-size: 18.5px; }
}
