/* Quiz Edu v0.9.33 — Modo simples */
:root { --ok-bg: #ddf5e5; --ok-fg: #145c2e; --warn-bg: #fff1dc; --warn-fg: #8a4b00; --err-bg: #fdeeee; --err-fg: #8a1f1f; --sel-bg: #f3f5ff; --muted-strong: #5c6684; }
:root[data-theme="dark"] { --ok-bg: #173a26; --ok-fg: #9be3b6; --warn-bg: #3d2c12; --warn-fg: #ffd59a; --err-bg: #3d1a1a; --err-fg: #ffb4b4; --sel-bg: #232c4d; --muted-strong: #b5bdd4; }

.sm-page { max-width: 1120px; margin: 0 auto; padding: 28px 20px 120px; }
.sm-page h1 { margin: 0; font-size: clamp(24px, 4vw, 34px); line-height: 1.15; font-weight: 800; }
.sm-sub { margin: 6px 0 0; color: var(--muted-strong); font-size: 15px; line-height: 1.5; }
.sm-back { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; font-size: 14px; text-decoration: none; margin-bottom: 14px; min-height: 32px; }
.sm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 22px; }
.sm-head > div { flex: 1 1 320px; }

.sm-btn { cursor: pointer; font: inherit; border-radius: 12px; min-height: 44px; padding: 0 18px; font-weight: 600; font-size: 15px; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.sm-btn:hover { border-color: var(--primary); }
.sm-btn.is-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.sm-btn.is-primary:hover { filter: brightness(.93); }
.sm-btn.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
.sm-btn.is-done { background: var(--ok-bg); border-color: transparent; color: var(--ok-fg); }
.sm-btn:disabled { opacity: .5; cursor: not-allowed; }
.sm-btn:focus-visible, .sm-card:focus-visible, .sm-link:focus-visible { outline: 3px solid #9aa6f0; outline-offset: 2px; }
.sm-link { cursor: pointer; font: inherit; background: none; border: 0; padding: 0; color: var(--primary); font-weight: 600; font-size: 14px; min-height: 32px; text-decoration: none; display: inline-flex; align-items: center; }

.sm-card { cursor: pointer; font: inherit; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; color: var(--text); text-decoration: none; }
.sm-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.sm-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; }

.sm-input { font: inherit; font-size: 16px; border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; min-height: 48px; background: var(--surface); color: var(--text); width: 100%; }
textarea.sm-input { padding: 12px 14px; min-height: 84px; resize: vertical; }
.sm-label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.sm-label small { font-weight: 400; color: var(--muted-strong); }

.sm-pill { display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--primary); }
.sm-pill.is-ok { background: var(--ok-bg); color: var(--ok-fg); }
.sm-pill.is-warn { background: var(--warn-bg); color: var(--warn-fg); }
.sm-pill.is-err { background: var(--err-bg); color: var(--err-fg); }
.sm-note { font-size: 14px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.sm-note.is-warn { background: var(--warn-bg); color: var(--warn-fg); }
.sm-note.is-err { background: var(--err-bg); color: var(--err-fg); }
.sm-muted { color: var(--muted-strong); }
.sm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sm-grow { flex: 1 1 auto; }
[hidden] { display: none !important; }

/* Início */
.sm-home { margin: 6px 0 30px; }
.sm-home-greet { margin: 0 0 4px; color: var(--muted-strong); font-size: 15px; }
.sm-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 20px; }
.sm-action { padding: 26px; display: flex; flex-direction: column; gap: 12px; min-height: 200px; }
.sm-action strong { font-size: 23px; font-weight: 800; }
.sm-action span.sm-action-text { font-size: 15px; line-height: 1.5; color: var(--muted-strong); }
.sm-action.is-main { background: var(--primary); border-color: var(--primary); color: #fff; }
.sm-action.is-main span.sm-action-text { color: rgba(255,255,255,.88); }
.sm-icon { width: 50px; height: 50px; border-radius: 14px; background: var(--surface-2); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.sm-action.is-main .sm-icon { background: rgba(255,255,255,.18); color: #fff; }
.sm-advanced-toggle { margin-top: 18px; }

/* Etapas */
.sm-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.sm-step { font-size: 14px; font-weight: 700; padding: 8px 14px; border-radius: 999px; background: var(--surface-2); color: var(--muted-strong); }
.sm-step.is-on { background: var(--primary); color: #fff; }
.sm-step.is-done { background: var(--ok-bg); color: var(--ok-fg); }

.sm-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 16px; }
.sm-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 14px; }
.sm-crumbs .sep { color: var(--muted); }
.sm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.sm-book { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.sm-book-cover { min-height: 116px; background: #2f3f9e; color: #fff; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.sm-book-cover small { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #cfd5ff; }
.sm-book-cover strong { font-size: 18px; line-height: 1.2; }
.sm-book-meta { padding: 14px 18px; font-size: 14px; color: var(--muted-strong); }
.sm-year { padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.sm-year strong { font-size: 26px; color: var(--primary); }
.sm-list { display: flex; flex-direction: column; gap: 10px; }
.sm-topic { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sm-topic > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 3px; }
.sm-topic strong { font-size: 16px; }
.sm-q { padding: 16px 18px; display: flex; align-items: flex-start; gap: 14px; width: 100%; }
.sm-q.is-on { border-color: var(--primary); background: var(--sel-bg); }
.sm-check { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 7px; margin-top: 2px; border: 2px solid #9aa3bd; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.is-on > .sm-check, .sm-check.is-on { background: var(--primary); border-color: var(--primary); }
.sm-q-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; }
.sm-q-body span { font-size: 15px; line-height: 1.5; }
.sm-q-body small { font-size: 12px; color: var(--muted-strong); }
.sm-selbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(27,39,82,.08); z-index: 20; }
.sm-selbar > div { max-width: 1120px; margin: 0 auto; padding: 12px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.sm-selbar strong { flex: 1 1 auto; font-size: 16px; }

.sm-form { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.sm-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.sm-mode { padding: 20px; display: flex; flex-direction: column; gap: 8px; border-width: 2px; }
.sm-mode strong { font-size: 18px; }
.sm-mode span { font-size: 14px; line-height: 1.5; color: var(--muted-strong); }
.sm-mode.is-on { border-color: var(--primary); background: var(--sel-bg); }
.sm-toggle { padding: 14px 16px; display: flex; align-items: center; gap: 12px; font-size: 15px; }

.sm-ready { display: flex; flex-wrap: wrap; gap: 26px; align-items: flex-start; }
.sm-ready > div:first-child { flex: 1 1 420px; display: flex; flex-direction: column; gap: 16px; }
.sm-code-box { background: var(--surface); border: 2px solid var(--primary); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.sm-code { font-size: clamp(38px, 8vw, 54px); font-weight: 800; letter-spacing: .12em; color: var(--primary); }
.sm-qr { flex: 0 1 260px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sm-qr canvas, .sm-qr img { width: 210px; height: 210px; image-rendering: pixelated; background: #fff; border-radius: 8px; }

/* Atividades */
.sm-act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.sm-act > div:first-child { flex: 1 1 280px; display: flex; flex-direction: column; gap: 4px; }
.sm-act strong { font-size: 17px; }

/* Treino */
.sm-practice { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.sm-practice h1 { font-size: 22px; line-height: 1.45; font-weight: 700; }
.sm-alt { padding: 16px 18px; font-size: 17px; font-weight: 600; border-width: 2px; width: 100%; }
.sm-alt.is-on { border-color: var(--primary); background: var(--sel-bg); }
.sm-alt.is-right { border-color: #1f8a4c; background: var(--ok-bg); color: var(--ok-fg); }
.sm-alt.is-wrong { border-color: #c0392b; background: var(--err-bg); color: var(--err-fg); }
.sm-alt.is-dim { opacity: .65; }
.sm-feedback { display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.5; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); }
.sm-feedback.is-ok { background: var(--ok-bg); color: var(--ok-fg); }
.sm-feedback.is-err { background: var(--err-bg); color: var(--err-fg); }
.sm-progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.sm-progress > span { display: block; height: 100%; background: var(--primary); }

/* Correção (resultados) */
.sm-grade { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.sm-grade-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.sm-student-view { border: 1px dashed #9aa6f0; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.sm-student-view > small { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }

/* Livros (admin) */
.sm-book-admin { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.sm-book-admin > div:first-child { flex: 1 1 260px; display: flex; flex-direction: column; gap: 3px; }

@media (max-width: 560px) {
  .sm-page { padding: 20px 16px 120px; }
  .sm-action { min-height: 0; }
}

/* Home do professor: o modo simples substitui a introdução e o cartão de código. */
body.simple-teacher .home-intro, body.simple-teacher .join-card-primary { display: none !important; }
body.bank-page-mode #simpleHome { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:root[data-theme="dark"] .sm-action.is-main, :root[data-theme="dark"] .sm-btn.is-primary, :root[data-theme="dark"] .sm-btn.is-on, :root[data-theme="dark"] .sm-step.is-on { background: #4557d6; border-color: #4557d6; color: #fff; }

/* ---- v0.9: menu principal e abas da atividade ---- */
.tn { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.tn-inner { max-width: 1180px; margin: 0 auto; padding: 6px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tn-link { display: inline-flex; align-items: center; min-height: 42px; padding: 0 13px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted-strong); text-decoration: none; }
.tn-link:hover { background: var(--surface-2); color: var(--text); }
.tn-link.is-on { background: var(--surface-2); color: var(--primary); }
.tn-tabs { background: var(--bg); border-bottom: 1px solid var(--border); }
.tn-tabs .tn-inner { gap: 6px; padding-top: 10px; padding-bottom: 10px; }
.tn-back { color: var(--primary); font-weight: 600; font-size: 14px; text-decoration: none; margin-right: 10px; min-height: 40px; display: inline-flex; align-items: center; }
.tn-tab { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; }
.tn-tab:hover { border-color: var(--primary); }
.tn-tab.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
:root[data-theme="dark"] .tn-tab.is-on { background: #4557d6; border-color: #4557d6; }
.tn-link:focus-visible, .tn-tab:focus-visible, .tn-back:focus-visible { outline: 3px solid #9aa6f0; outline-offset: 2px; }
@media print { .tn, .tn-tabs { display: none !important; } }
@media (max-width: 560px) { .tn-inner { padding: 6px 12px; } .tn-link { padding: 0 10px; font-size: 13px; } }
.sm-home-extra { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-top: 18px; }
.sm-pending-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg); color: var(--text); text-decoration: none; }
.sm-pending-row > span:first-child { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.sm-pending-row small { color: var(--muted-strong); font-size: 13px; }
.sm-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sm-shortcuts a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.sm-shortcuts a:hover { border-color: var(--primary); }
.sm-shortcuts span { font-size: 13px; color: var(--muted-strong); }
.sm-three { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
details.sm-panel > summary { list-style: revert; min-height: 32px; }
.bank-group-title { margin: 14px 0 4px; font-size: 16px; font-weight: 800; display: flex; align-items: baseline; gap: 8px; grid-column: 1 / -1; }
.bank-group-title span { font-size: 13px; font-weight: 500; color: var(--muted-strong); }
.bank-group-by { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin-left: auto; }
.bank-group-by select { min-height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 8px; font: inherit; }
/* v0.9: com o menu novo, as abas internas da atividade e as seções antigas da Home ficam redundantes. */
body.has-tn .application-shell-tabs { display: none !important; }
body.simple-teacher.has-tn #managementSection, body.simple-teacher.has-tn #publicExplore { display: none !important; }
/* v0.9.13: escolha na Base em cascata */
.bp { display: flex; flex-direction: column; gap: 12px; }
.bp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.bp-skill { display: flex; flex-direction: column; gap: 6px; }
.bp-chosen { font-size: 13px; font-weight: 400; }
.bp select:disabled { opacity: .6; }
/* v0.9.13: Banco com coluna de filtros */
.bank-title { margin: 0; font-size: clamp(24px, 4vw, 30px); font-weight: 800; }
.bank-layout { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.bank-aside { flex: 1 1 260px; max-width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.bank-aside .bp-grid { grid-template-columns: 1fr; gap: 8px; }
.bank-aside .sm-input, .bank-aside select, .bank-aside input:not([type=checkbox]) { width: 100%; min-height: 40px; font-size: 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 10px; font-family: inherit; }
.bank-aside .sm-label, .bank-f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.bank-aside-title { font-size: 13px; color: var(--primary); margin-top: 4px; }
.bank-aside-more { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.bank-aside .bank-more-filters > summary { cursor: pointer; font-weight: 700; font-size: 14px; min-height: 32px; display: flex; align-items: center; gap: 8px; }
.bank-legacy { display: flex; flex-direction: column; gap: 8px; }
.bank-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 860px) { .bank-aside { max-width: none; } }
.bank-aside.bank-filters-rc2.bank-filters-primary { display: flex; flex-direction: column; grid-template-columns: none; margin: 0; }
.bank-aside select, .bank-aside .sm-input { font-weight: 500; }
.bp-field:has(select[data-bp="stage"]) { grid-column: 1 / -1; }
.bank-aside-toggle { display: none; }
@media (max-width: 860px) {
  .bank-aside-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 44px; font-weight: 700; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); padding: 0 14px; font: inherit; font-weight: 700; }
  .bank-aside-toggle::after { content: '▾'; }
  .bank-aside.open .bank-aside-toggle::after { content: '▴'; }
  .bank-aside:not(.open) > :not(.bank-aside-toggle) { display: none !important; }
  .bank-aside:not(.open) { padding: 0; border: 0; background: transparent; }
}
/* v0.9.13: aviso de carregamento da Base */
.bp-loading { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--primary); }
.bp-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: bp-spin .8s linear infinite; flex: none; }
@keyframes bp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bp-spin { animation-duration: 2.4s; } }
.bp select:disabled { opacity: .7; }
/* v0.9.13: editor de questão reorganizado */
.qe-page { width: min(1240px, calc(100% - 32px)); }
.qe-top { margin-bottom: 18px; }
.qe-top h1 { margin: 6px 0 0; font-size: clamp(26px, 4vw, 34px); font-weight: 800; }
.qe-form { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.qe-main, .qe-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.qe-side { position: sticky; top: 84px; }
.qe-card { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; }
.qe-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.qe-h { margin: 0; font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.qe-help { margin: 0; color: var(--muted-strong, var(--muted)); font-size: 14px; line-height: 1.5; }
.qe-field, .qe-stack label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.qe-field select { max-width: 360px; }
.qe-stack { display: flex; flex-direction: column; gap: 10px; }
.qe-stack input, .qe-stack select, .qe-field select, .qe-field textarea { width: 100%; }
.qe-more > summary { cursor: pointer; font-weight: 700; font-size: 14px; min-height: 36px; display: flex; align-items: center; gap: 8px; color: var(--primary); }
.qe-more[open] > summary { margin-bottom: 8px; }
.qe-check { font-weight: 600; }
.qe-link { align-self: flex-start; padding: 6px 0; font-weight: 700; }
.qe-side .bp-grid { grid-template-columns: 1fr; gap: 8px; }
.qe-side .bp-field:has(select[data-bp="stage"]) { grid-column: auto; }
.qe-side .bp select[size] { min-height: 170px !important; }
.qe-main .alternative-row { grid-template-columns: 40px minmax(0, 1fr) minmax(150px, 210px) 36px; }
.qe-actions .editor-save-group { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 980px) {
  .qe-form { grid-template-columns: 1fr; }
  .qe-side { position: static; }
}
@media (max-width: 640px) {
  .qe-main .alternative-row { grid-template-columns: 36px minmax(0, 1fr); }
  .qe-main .alternative-row .alt-kind { grid-column: 2; }
  .qe-main .alternative-row .remove-alternative { grid-column: 1; grid-row: 1; align-self: end; }
  .qe-actions { flex-direction: column; align-items: stretch; }
}
.qe-side { position: static; }
.qe-side .bp-chosen { display: none; }
.qe-stack input, .qe-stack select, .qe-field select, .qe-page .media-row select, .qe-page .media-row input:not([type=file]) {
  min-height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text);
  padding: 0 12px; font: inherit; font-size: 15px; font-weight: 500; box-sizing: border-box;
}
.qe-stack input:focus, .qe-stack select:focus, .qe-field select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.qe-page .media-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.qe-page .full-field { font-size: 14px; font-weight: 700; color: var(--text); display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 640px) {
  .qe-actions { flex-direction: row; align-items: center; padding: 10px 12px; }
  .qe-actions .editor-cancel-link { padding: 8px 12px; }
  .qe-actions #saveStatus { display: none; }
  .qe-actions #openQuestionAi, .qe-actions #openQuestionExternalPrompt { display: none; }
}
/* v0.9.13: diálogo "Guardar em grupo" */
.sm-dialog { border: 0; border-radius: 20px; padding: 24px; width: min(520px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(15, 23, 42, .25); }
.sm-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.sm-dialog label:has(input:disabled) { opacity: .5; }
/* v0.9.13: sub-abas do "Do meu banco" */
.sm-subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; border-bottom: 1px solid var(--border); }
.sm-subtab { border: 0; background: transparent; color: var(--muted-strong, var(--muted)); font: inherit; font-weight: 700; font-size: 15px; padding: 10px 14px; min-height: 44px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.sm-subtab.is-on { color: var(--primary); border-bottom-color: var(--primary); }
.sm-subtab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
#bankBaseFilter .bp-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.bank-open-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.bank-open-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.bank-open-grid .sm-label { font-size: 13px; }
.bank-open-grid select.sm-input { min-height: 42px; font-size: 14px; }
.sm-origin { color: var(--primary) !important; font-weight: 600; }
.sm-owner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.sm-owner-label { font-weight: 700; font-size: 14px; margin-right: 4px; }
.sm-owner-opt { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 14px; min-height: 36px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.sm-owner-opt.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
.sm-owner-opt:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* v0.9.13: no Banco, nada da página inicial aparece (nem por um instante). */
html.route-bank #simpleHome, html.route-bank #continueAttemptCard, html.route-bank .home-intro { display: none !important; }
html.route-bank #bankPanel[hidden] { display: block !important; }
html.tn-teacher.route-home .home-intro, html.tn-teacher.route-home .join-card-primary,
html.tn-teacher.route-home #publicExplore, html.tn-teacher.route-home #managementSection { display: none !important; }
html.tn-teacher.route-home #simpleHome[hidden] { display: block !important; }
/* v0.9.13: passo Conferir */
.rev-summary { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.rev-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rev-line > strong { min-width: 120px; font-size: 14px; }
.sm-pill.is-muted { opacity: .65; }
.rev-add { flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.rev-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rev-item { display: flex; align-items: flex-start; gap: 12px; }
.rev-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.rev-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.rev-statement { font-weight: 600; overflow-wrap: anywhere; }
.rev-tools { display: flex; gap: 6px; flex: none; }
.rev-icon { min-width: 40px; padding: 0 10px; }
.rev-actions { justify-content: space-between; margin-top: 18px; position: sticky; bottom: 0; background: var(--bg, var(--surface)); padding: 12px 0; }
@media (max-width: 640px) { .rev-item { flex-wrap: wrap; } .rev-tools { width: 100%; justify-content: flex-end; } }
/* v0.9.13: quiz em andamento */
.pending-banner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 16px; border-left: 4px solid var(--primary); }
.leave-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%; min-height: 56px; padding: 10px 14px; }
.leave-opt small { font-weight: 500; font-size: 13px; opacity: .85; }
.home-in-progress { display: flex; align-items: center; gap: 12px; margin-top: 18px; text-decoration: none; color: var(--text); border-left: 4px solid var(--primary); }
.home-in-progress:hover { border-color: var(--primary); }
.home-in-progress-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); flex: none; }
/* v0.9.13: "Filtrar" recolhido */
.bank-open-summary { cursor: pointer; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; min-height: 32px; list-style: none; }
.bank-open-summary::-webkit-details-marker { display: none; }
.bank-open-summary > span:first-child::before { content: '▸'; display: inline-block; margin-right: 8px; color: var(--primary); transition: transform .15s; }
.bank-open-filters[open] .bank-open-summary > span:first-child::before { transform: rotate(90deg); }
.bank-open-filters[open] .bank-open-summary { margin-bottom: 10px; }
.bank-open-hint { font-size: 13px; font-weight: 500; }
@media (max-width: 640px) { .bank-open-hint { display: none; } }
@media (max-width: 640px) {
  .sm-owner-opt { padding: 4px 10px; min-height: 32px; font-size: 13px; }
  .sm-owner-label { font-size: 13px; }
}
.bank-open-filters:not([open]) { padding-top: 10px; padding-bottom: 10px; gap: 0; }
.bank-open-filters:not([open]) .bank-open-summary { margin: 0; }
/* v0.9.13: Configurações e Questões da atividade (visual novo) */
.ae-page { width: min(1000px, calc(100% - 32px)); margin-inline: auto; }
.ae-stack { display: flex; flex-direction: column; gap: 16px; }
.ae-stack-sm { display: flex; flex-direction: column; gap: 12px; }
.ae-card { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; }
.ae-h { margin: 0; font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ae-kicker { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--primary); }
.ae-help { margin: 0; color: var(--muted-strong, var(--muted)); font-size: 14px; line-height: 1.5; font-weight: 500; }
.ae-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.ae-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ae-totals { display: flex; gap: 6px; flex-wrap: wrap; }
.ae-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; align-items: end; }
.ae-field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.ae-field input:not([type=checkbox]):not([type=radio]), .ae-field select, .ae-field textarea {
  width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text);
  padding: 0 12px; font: inherit; font-size: 15px; font-weight: 500; box-sizing: border-box; }
.ae-field textarea { padding: 10px 12px; min-height: 90px; }
.ae-field input:disabled { opacity: .8; background: var(--surface-2, var(--bg)); }
.ae-switches { display: flex; flex-direction: column; gap: 4px; }
.ae-switch { display: flex; gap: 12px; align-items: flex-start; padding: 10px 4px; cursor: pointer; border-radius: 10px; }
.ae-switch:hover { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.ae-switch input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--primary); }
.ae-switch span { display: flex; flex-direction: column; gap: 2px; }
.ae-switch small { color: var(--muted); font-size: 13px; font-weight: 500; }
.ae-sub { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.ae-sub h3 { margin: 0; font-size: 15px; font-weight: 800; }
.ae-inner { padding: 12px 14px; border: 1px dashed var(--border); border-radius: 12px; }
.ae-quota { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.ae-span { grid-column: 1 / -1; }
.ae-danger { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; }
.ae-danger p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.ae-more > summary, .ae-more-card > summary { cursor: pointer; font-weight: 700; font-size: 14px; min-height: 36px; display: flex; align-items: center; gap: 8px; color: var(--primary); list-style: none; }
.ae-more-card > summary { color: var(--text); font-size: 16px; }
.ae-more > summary::-webkit-details-marker, .ae-more-card > summary::-webkit-details-marker { display: none; }
.ae-more > summary::before, .ae-more-card > summary::before { content: '▸'; color: var(--primary); transition: transform .15s; }
.ae-more[open] > summary::before, .ae-more-card[open] > summary::before { transform: rotate(90deg); }
.ae-more-card[open] > summary { margin-bottom: 8px; }
.ae-more-card .ae-sub + .ae-sub { border-top: 1px solid var(--border); padding-top: 14px; }
.ae-appearance { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.ae-option { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.ae-option:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.ae-option input { margin-top: 3px; accent-color: var(--primary); }
.ae-option span { display: flex; flex-direction: column; gap: 2px; }
.ae-option small { color: var(--muted); font-size: 13px; }
.ae-profile { flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; border-left: 4px solid var(--primary); }
.ae-code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ae-points-help { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--primary) 7%, transparent); }
/* lista de questões com pontos */
.ae-question-list { display: flex; flex-direction: column; gap: 10px; }
.ae-page .application-question-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.ae-page .application-question-card .group-question-order strong { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 14px; }
.ae-page .application-question-card .group-question-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ae-page .application-question-card .group-question-main > strong { font-weight: 600; overflow-wrap: anywhere; }
.ae-page .application-points-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.ae-page .application-points-input { width: 90px; min-height: 40px; border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; font: inherit; font-size: 15px; font-weight: 700; text-align: center; background: var(--surface); color: var(--text); }
.ae-page .application-question-card .stack-actions { display: flex; gap: 6px; flex: none; }
@media (max-width: 640px) {
  .ae-page .application-question-card { flex-wrap: wrap; }
  .ae-page .application-question-card .stack-actions { width: 100%; justify-content: flex-end; }
  .ae-profile { flex-direction: column; align-items: stretch; }
}
.ae-narrow { max-width: 420px; }
/* v0.9.13: Resultados no visual novo */
.rs-page { display: flex; flex-direction: column; gap: 14px; width: min(1100px, 100%); margin-inline: auto; }
.rs-version { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rs-version label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.rs-version select { min-height: 38px; border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; background: var(--surface); color: var(--text); font: inherit; }
.rs-review { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-left: 4px solid #d97706; }
.rs-review strong { font-size: 16px; }
.rs-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.rs-metric { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.rs-metric span { font-size: 13px; font-weight: 700; color: var(--muted-strong, var(--muted)); }
.rs-metric strong { font-size: 26px; font-weight: 800; }
.rs-metric small { font-size: 12px; color: var(--muted); }
.rs-tabs { margin: 4px 0 0; }
.rs-filters { display: flex; flex-direction: column; gap: 10px; }
.rs-status { margin: 0; }
.rs-filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.rs-grow { flex: 1 1 240px; }
.rs-grade { flex: 0 1 220px; }
.rs-table table { width: 100%; }
.rs-correct { background: #d97706 !important; border-color: #d97706 !important; color: #fff !important; font-weight: 700; }
.rs-dialog-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--surface); }
@media (max-width: 720px) {
  .rs-table thead { display: none; }
  .rs-table table, .rs-table tbody, .rs-table tr, .rs-table td { display: block; width: 100%; }
  .rs-table tr { border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; background: var(--surface); }
  .rs-table td { border: 0 !important; padding: 4px 0 !important; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .rs-table td::before { content: attr(data-label); font-weight: 700; color: var(--muted-strong, var(--muted)); text-align: left; }
  .rs-table td:first-child { display: block; text-align: left; font-size: 15px; }
  .rs-table td:first-child::before { content: none; }
  .rs-table td:last-child::before { content: none; }
  .rs-table td:last-child { justify-content: flex-end; }
}
@media (max-width: 720px) {
  .rs-table { overflow: visible !important; }
  .rs-table table { min-width: 0 !important; table-layout: auto; }
  .rs-table tr, .rs-table td { box-sizing: border-box; }
  .rs-table td { white-space: normal !important; min-width: 0 !important; }
  .rs-table td:first-child small { display: block; }
}
.saved-note { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; border-left: 4px solid #16a34a; }
/* v0.9.14: imagens do livro */
.book-thumb { display: block; max-width: 160px; max-height: 110px; object-fit: contain; border-radius: 8px; border: 1px solid var(--border); background: #fff; margin: 4px 0; }
.book-fig { margin: 6px 0; display: flex; flex-direction: column; gap: 4px; }
.book-fig img { max-width: min(420px, 100%); border-radius: 10px; border: 1px solid var(--border); background: #fff; }
.book-fig figcaption { font-size: 12px; color: var(--muted); }
.book-fig figcaption.is-warn { color: #b45309; font-weight: 700; }
.practice-img { display: block; max-width: min(560px, 100%); max-height: 50vh; object-fit: contain; border-radius: 12px; background: #fff; margin: 8px 0; }
.sm-alt { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.practice-alt-img { max-width: 140px; max-height: 110px; object-fit: contain; border-radius: 8px; background: #fff; }

/* ---------- v0.9.15 — Editor de grupo: curadoria no visual novo ---------- */
.ge-summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.ge-summary-main { min-width: 0; flex: 1 1 320px; }
.ge-summary-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 18px; }
.ge-summary-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ge-summary-meta span, .ge-q-meta span { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted-strong); }
.ge-summary-desc { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.ge-summary-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ge-danger { color: var(--err-fg) !important; }
.ge-danger-solid { background: var(--err-fg) !important; border-color: var(--err-fg) !important; color: #fff !important; }
.ge-header-done { display: flex; justify-content: flex-end; margin: -4px 0 16px; }

.ge-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }
.ge-chip.is-ready, .ge-chip.is-group-ready { background: var(--ok-bg); color: var(--ok-fg); border-color: transparent; }
.ge-chip.is-review, .ge-chip.is-group-curating { background: var(--warn-bg); color: var(--warn-fg); border-color: transparent; }
.ge-chip.is-archived, .ge-chip.is-group-archived { opacity: .75; }

.ge-curation { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.ge-counts { font-size: 14px; }
.ge-n-review { color: var(--warn-fg); }
.ge-filters { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.ge-filter { border: 0; background: transparent; color: inherit; font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.ge-filter.is-on { background: var(--primary); color: #fff; font-weight: 700; }
.ge-curation-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.group-question-card.ge-card { display: block; padding: 14px 16px; }
.ge-card.is-ready { border-color: color-mix(in srgb, var(--ok-fg) 35%, var(--border)); }
.ge-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ge-id { font-size: 11px; color: var(--muted); font-family: ui-monospace, monospace; }
.ge-order { margin-left: auto; display: inline-flex; gap: 4px; }
.ge-order button { padding: 4px 9px; }
.ge-card-body, .ge-review-card { margin-top: 10px; }
.ge-q-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.ge-other { background: var(--warn-bg) !important; color: var(--warn-fg) !important; border-color: transparent !important; }
.group-question-card p.ge-statement, .ge-statement { margin: 10px 0 8px; font-size: 15px; line-height: 1.5; color: var(--text); white-space: pre-wrap; overflow: visible; text-overflow: clip; }
.ge-fig { margin: 8px 0; }
.ge-fig img { display: block; max-width: min(100%, 520px); max-height: 320px; object-fit: contain; border-radius: 10px; border: 1px solid var(--border); background: #fff; }
.ge-fig figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ge-media-link { display: inline-block; margin: 4px 0; font-size: 13px; }
.ge-alts { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 6px; }
.ge-alt { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); font-size: 14px; }
.ge-alt.is-correct { background: var(--ok-bg); border-color: transparent; color: var(--ok-fg); font-weight: 600; }
.ge-alt-letter { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); font-weight: 800; font-size: 12px; }
.ge-alt.is-correct .ge-alt-letter { background: var(--ok-fg); color: #fff; }
.ge-alt-ok { font-size: 12px; font-weight: 800; white-space: nowrap; }
.ge-alt .ge-fig img { max-height: 140px; }
.ge-pairs { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 6px; }
.ge-pairs li { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); font-size: 14px; }
.group-question-card p.ge-answer, .ge-answer { margin: 6px 0; font-size: 14px; color: var(--text); white-space: normal; }
.ge-accept { display: inline-block; padding: 2px 8px; margin: 2px 2px 0 0; border-radius: 8px; background: var(--ok-bg); color: var(--ok-fg); }
.group-question-card p.ge-warn, .ge-warn { margin: 6px 0; font-size: 13px; color: var(--warn-fg); white-space: normal; }
.ge-expl { margin-top: 8px; font-size: 13px; }
.ge-expl summary { cursor: pointer; color: var(--muted-strong); }
.group-question-card .ge-expl p { white-space: normal; color: var(--text); font-size: 13px; margin: 6px 0 0; }
.ge-card-actions { margin-top: 12px; justify-content: flex-start !important; }
.ge-more-apps { margin-top: 12px; }
.ge-more-apps summary { cursor: pointer; color: var(--muted-strong); font-size: 13px; }
.ge-more-apps .group-final-actions { margin-top: 8px; }

.ge-review-dialog { width: min(760px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); padding: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); }
.ge-review-dialog::backdrop { background: rgba(10, 16, 40, .55); }
.ge-review-shell { display: flex; flex-direction: column; max-height: calc(100dvh - 22px); }
.ge-review-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.ge-review-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ge-review-bar span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .25s; }
.ge-review-card { flex: 1; overflow: auto; padding: 4px 18px 12px; margin-top: 0; }
.ge-review-card .ge-card-head { margin-top: 12px; }
.ge-review-end { padding: 30px 6px; text-align: center; font-size: 16px; }
.ge-review-actions { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.ge-review-actions > * { justify-content: center; text-align: center; padding: 12px 10px; }
.ge-confirm-dialog { width: min(480px, calc(100vw - 24px)); }
@media (max-width: 720px) {
  .ge-curation { flex-direction: column; align-items: stretch; }
  .ge-filters { justify-content: space-between; }
  .ge-filter { flex: 1; }
  .ge-curation-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .ge-review-actions { grid-template-columns: 1fr 1fr; }
  .ge-review-actions #reviewApprove { grid-column: 1 / -1; }
  .ge-pairs li { grid-template-columns: 1fr; gap: 2px; }
  .ge-pairs li > span[aria-hidden] { display: none; }
  .ge-summary-actions { width: 100%; }
  .ge-summary-actions > * { flex: 1; }
}
.ge-hint { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--muted-strong); }
.ge-card.is-archived { opacity: .7; }
.ge-delete-hint { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--muted); text-align: right; }
.ge-summary-actions { flex-wrap: wrap; justify-content: flex-end; }
.ge-summary-actions button:disabled { opacity: .5; cursor: not-allowed; }
.ge-curation-actions button:disabled { opacity: .45; cursor: not-allowed; }
/* v0.9.17 */
.alt-move-tools { display: inline-flex; gap: 4px; }
.alt-move-tools button { min-width: 34px; }
.alt-move-tools button:disabled { opacity: .4; }
.sm-ext { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; border-style: dashed; }
.sm-ext-steps { margin: 0; padding-left: 20px; font-size: 14px; display: grid; gap: 4px; }
.ai-generator-dialog.is-external #runAiGenerator { display: none; }
@media (min-width: 721px) { .alt-media-tools { grid-template-columns: minmax(160px, 1fr) auto auto !important; } }
/* v0.9.18 — ordem das alternativas na revisão */
.ge-alt { grid-template-columns: 28px minmax(0, 1fr) auto auto; }
.ge-alt.is-editing { border-style: dashed; }
.ge-alt-move { display: inline-flex; gap: 4px; }
.ge-alt-move button { padding: 3px 9px; }
.ge-order-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; font-size: 13px; }
.ge-order-label { color: var(--muted-strong); }
.ge-letters { display: inline-flex; gap: 4px; }
.ge-letter { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 800; cursor: pointer; }
.ge-letter:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.ge-letter.is-on { background: var(--ok-fg); border-color: var(--ok-fg); color: #fff; cursor: default; }
.ge-letter:disabled:not(.is-on) { opacity: .5; }
.sm-help-line { margin: 0 0 4px; font-weight: 700; display: flex; align-items: center; }
.sm-addto { margin: 0 0 12px; } .sm-addto a { font-weight: 700; margin-left: 4px; }
/* v0.9.22 — coleção */
.ge-origin { font-size: 12px; font-weight: 600; color: var(--muted-strong); text-decoration: none; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); }
a.ge-origin:hover { color: var(--primary); text-decoration: underline; }
.editor-card-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* v0.9.22 — projeto */
.pj-picker { margin-top: 6px; }
.pj-add-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.pj-add-row .muted { font-size: 13px; }
.pj-skill { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.pj-skill > div:first-child { flex: 1 1 320px; min-width: 0; }
.pj-skill p { margin: 4px 0 0; font-size: 14px; }
.pj-skill-actions { display: flex; align-items: center; gap: 10px; }
.pj-use { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.pj-note { font-size: 13px; margin: 10px 0 0; }
.pj-more { margin-top: 14px; }
.pj-more .group-header-grid { margin-top: 10px; }
.pj-tech { display: block; font-size: 12px; margin-top: 6px; }
/* v0.9.22 — campos do projeto e da coleção */
#projectForm .group-header-grid, #cInfo .group-header-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#projectForm .group-header-grid label, #cInfo .group-header-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 800; color: var(--muted-strong); }
#projectForm .group-header-grid :is(input, select, textarea), #cInfo .group-header-grid :is(input, select, textarea) { width: 100%; box-sizing: border-box; font: inherit; font-weight: 400; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
#projectForm .group-header-grid textarea, #cInfo .group-header-grid textarea { resize: vertical; }
@media (max-width: 720px) { #projectForm .group-header-grid, #cInfo .group-header-grid { grid-template-columns: 1fr; } #projectForm .group-header-grid .span-2, #cInfo .group-header-grid .span-2 { grid-column: auto; } }
/* v0.9.24: Pedir à IA — questão livre (sem Base) */
.ai-free { display: flex; flex-direction: column; gap: 12px; }
.ai-free[hidden] { display: none; }
.ai-free textarea { font-size: 16px; line-height: 1.5; }
#aiNewsTip { margin: 0; font-size: 14px; line-height: 1.5; }
/* v0.9.25: Ajustar — misturar alternativas */
.sm-check-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; line-height: 1.45; }
.sm-check-row input { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.sm-check-row .sm-muted { font-size: 13px; }
/* v0.9.26: coleção na tela do grupo — origem de cada questão */
.ge-q-meta .ge-origin { font-size: 12px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2, #eef2ff); color: var(--primary, #4557d6); font-weight: 600; text-decoration: none; }
.ge-q-meta a.ge-origin:hover { text-decoration: underline; }
/* v0.9.28: Minhas atividades — «Feita com» */
.act-made-with { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: -4px; font-size: 13px; }
.act-made-label { color: var(--muted); font-weight: 700; }
.act-made-chip { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--primary, #4557d6); font-weight: 600; text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
span.act-made-chip { color: var(--muted-strong); }
a.act-made-chip:hover { text-decoration: underline; }
/* v0.9.28: filtros dentro do grupo e da coleção */
.ge-more-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; width: 100%; padding-top: 10px; border-top: 1px dashed var(--border); }
.ge-more-filters[hidden] { display: none; }
.ge-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted-strong); min-width: 150px; flex: 1 1 150px; max-width: 230px; }
.ge-f[hidden] { display: none; }
.ge-f-search { flex: 2 1 220px; max-width: 360px; }
.ge-f input[type=search], .ge-f select { font: inherit; font-size: 14px; font-weight: 500; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); min-height: 40px; }
.ge-f-check { flex-direction: row; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; color: var(--warn-fg, #8a4b00); max-width: none; flex: 0 1 auto; }
.ge-f-check input { width: 20px; height: 20px; }
.ge-filter-info { width: 100%; margin: 0; font-size: 13px; color: var(--muted-strong); }
.ge-filter-info[hidden] { display: none; }
.ge-linkbtn { background: none; border: 0; padding: 0; color: var(--primary, #4557d6); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.ge-used-in { margin: 8px 0 0; font-size: 13px; color: var(--muted-strong); }
.ge-used-in a { color: var(--primary, #4557d6); font-weight: 600; }
@media (max-width: 560px) { .ge-f, .ge-f-search { max-width: none; flex-basis: 100%; } }
/* v0.9.29: Minhas atividades — página inicial e mudanças não publicadas */
.act-public { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #e3f6ea; color: #17643a; border: 1px solid #9fd8b5; }
:root[data-theme="dark"] .act-public { background: #12331f; color: #9fe3b8; border-color: #245c38; }
.act-pending { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--warn-bg, #fff1dc); color: var(--warn-fg, #8a4b00); font-size: 14px; font-weight: 600; }
.act-pending span { flex: 1 1 260px; }
/* v0.9.29: Criar quiz — quem pode abrir */
.who-opens { display: flex; flex-direction: column; gap: 8px; }
.who-opt { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; line-height: 1.45; }
.who-opt input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.who-opens .sm-note { margin: 0; }

/* v0.9.29: Visão geral da atividade */
.ov { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.ov-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 14px; font-size: 16px; font-weight: 600; border: 1px solid var(--border); background: var(--surface); }
.ov-next.is-info { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.ov-next.is-warn { border-color: #e5b45a; background: color-mix(in srgb, #f3b23a 13%, var(--surface)); }
.ov-next.is-ok { border-color: #6cc08a; background: color-mix(in srgb, #2fa35a 10%, var(--surface)); }
.ov-next.is-muted { color: var(--muted-strong); }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ov-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ov-card { display: flex; flex-direction: column; gap: 10px; }
.ov-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ov-card-head h2 { margin: 0; font-size: 18px; }
.ov-link { font-weight: 700; text-decoration: none; color: var(--primary); white-space: nowrap; }
.ov-link:hover { text-decoration: underline; }
.ov-text { margin: 0; font-size: 15px; line-height: 1.5; }
.ov-small { margin: 0; font-size: 13px; }
.ov-code { margin: 0; font-size: clamp(36px, 7vw, 52px); font-weight: 800; letter-spacing: .12em; color: var(--primary); line-height: 1.1; }
.ov-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ov-switch { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin-top: 4px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.ov-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ov-switch-ui { flex: none; width: 46px; height: 26px; border-radius: 999px; background: var(--border); position: relative; transition: background .15s; }
.ov-switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.ov-switch input:checked + .ov-switch-ui { background: var(--primary, #4557d6); }
.ov-switch input:checked + .ov-switch-ui::after { transform: translateX(20px); }
.ov-switch input:focus-visible + .ov-switch-ui { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }
.ov-switch strong { display: block; font-size: 15px; }
.ov-switch small { display: block; color: var(--muted-strong); font-size: 13px; line-height: 1.4; }
.ov-warn { margin: 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, #f3b23a 15%, var(--surface)); font-size: 14px; }
.ov-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.ov-num { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.ov-num strong { font-size: 26px; line-height: 1.1; }
.ov-num span { color: var(--muted-strong); font-size: 14px; }
.ov-num.is-warn { background: color-mix(in srgb, #f3b23a 16%, var(--surface)); }
.ov-num-note { grid-column: 1 / -1; }
.ov-students { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ov-students li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name status" "when status"; gap: 0 10px; padding: 10px 0; border-top: 1px solid var(--border); align-items: center; }
.ov-st-name { grid-area: name; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-st-when { grid-area: when; color: var(--muted); font-size: 13px; }
.ov-st-status { grid-area: status; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.ov-st-status.is-done { background: color-mix(in srgb, #2fa35a 14%, var(--surface)); color: #1f7a43; }
.ov-st-status.is-review { background: color-mix(in srgb, #f3b23a 18%, var(--surface)); color: #8a5a00; }
.ov-st-status.is-doing { background: color-mix(in srgb, var(--primary) 12%, var(--surface)); color: var(--primary); }
.ov-st-status.is-left { color: var(--muted); }
.ov-rules { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.45; }
.big-dialog { border: 0; border-radius: 20px; padding: 32px; max-width: 95vw; text-align: center; background: var(--surface); color: var(--text); }
.big-dialog::backdrop { background: rgba(10, 16, 40, .7); }
.big-host { margin: 0 0 8px; font-size: 20px; }
.big-code { margin: 0 0 18px; font-size: min(18vw, 140px); font-weight: 800; letter-spacing: .12em; color: var(--primary, #4557d6); line-height: 1; }
.big-dialog canvas { display: block; margin: 0 auto 16px; width: min(50vh, 320px); height: min(50vh, 320px); image-rendering: pixelated; background: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden].ov-link, a[hidden] { display: none !important; }
@media (max-width: 860px) { .ov-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .ov-actions .sm-btn { flex: 1 1 45%; } .ov-next { font-size: 15px; } }

/* v0.9.30: Imprimir / PDF em 3 passos */
.pr-page .print-config-head h1 { margin: 6px 0 4px; }
.pr-page .print-summary-card { margin-top: 16px; }
.pr-step .print-copy-header-head > div { position: relative; padding-left: 44px; }
.pr-num { position: absolute; left: 0; top: 2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--primary, #4557d6); color: #fff; font-weight: 800; font-size: 16px; }
.pr-step h2 { margin: 3px 0 4px; font-size: 19px; }
.pr-field { display: flex; flex-direction: column; gap: 8px; }
.pr-checks { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.pr-page .print-copy-header-grid label.pr-check, .pr-check { display: flex !important; flex-direction: row !important; gap: 12px; align-items: flex-start; padding: 10px 8px; border-radius: 10px; cursor: pointer; font-size: 15px !important; font-weight: 700 !important; color: var(--text) !important; }
.pr-check:hover { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.pr-check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.pr-check small { display: block; font-weight: 500; color: var(--muted-strong); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.pr-check:has(input:disabled) { opacity: .6; cursor: default; }
.pr-key { border: 1px dashed #e5b45a; }
.pr-remember { padding: 4px 2px; }
.pr-help { display: block; font-weight: 500; color: var(--muted-strong); font-size: 13px; line-height: 1.4; }
.print-summary-stats span[hidden] { display: none !important; }

/* v0.9.30: Resultados e correção */
.rs-metrics .rs-metric[hidden] { display: none; }
.rs-metrics-note { grid-column: 1 / -1; margin: 0; order: 9; }
/* Janela de correção: só o meio rola; cabeçalho e rodapé ficam fixos e nada passa por baixo do rodapé. */
.results-detail-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.results-detail-dialog .dialog-shell { display: flex; flex-direction: column; overflow: hidden; padding: 22px 22px 0; max-height: 92vh; min-height: 0; flex: 1 1 auto; }
.results-detail-dialog .dialog-head { position: static; flex: none; margin-bottom: 0; }
.results-detail-dialog #attemptDetail { overflow-y: auto; flex: 1 1 auto; min-height: 0; padding: 16px 2px 16px; overscroll-behavior: contain; }
.results-detail-dialog .rs-dialog-foot { position: static; flex: none; margin-top: 0; padding: 12px 0 16px; }
.rs-detail-h { margin: 16px 0 10px; font-size: 16px; }
.manual-review-question.is-pending { border-color: #e5b45a; box-shadow: 0 0 0 1px #e5b45a inset; }
.rs-detail-rest { margin-top: 16px; }
.rs-detail-rest > summary { cursor: pointer; font-weight: 700; color: var(--primary); padding: 8px 0; }
.rs-detail-rest > .attempt-detail-list { margin-top: 10px; }
@media (max-width: 560px) { .results-detail-dialog .dialog-shell { padding: 16px 14px 0; } }
.pr-page .print-copy-header-grid { align-items: start; }
.pr-page .print-copy-header-grid label { align-content: start; font-size: 13px; }
.pr-page .print-copy-header-grid label .muted { display: inline; font-weight: 600; }
.pr-page .print-copy-header-grid select { width: 100%; padding: 10px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; }
.pr-page .print-copy-header-grid input[type="checkbox"] { width: 20px; padding: 0; }
.pr-page .pr-field > label:first-child { display: grid; gap: 6px; }

/* v0.9.31: Lixeira em Minhas atividades */
.trash-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-style: dashed; }
.trash-note > span { flex: 1 1 320px; }

/* v0.9.32: Relatório da atividade */
.rs-report-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }
