/* Banco de questões — visual coerente com a Home (vidro fosco, dourado, Cormorant) */

:root {
  --gold: #d4a857;
  --gold-telos: #d4a857;
  --gold-light: #fbe8b4;
  --gold-mid: #e8c477;
  --gold-deep: #a87930;
  --bg-deep: #07121f;
  --bg-ink: #0e0a06;
  --text: #f7eccd;
  --text-soft: rgba(247, 236, 205, 0.82);
  --text-mute: rgba(247, 236, 205, 0.6);
  --glass: rgba(14, 10, 6, 0.36);
  --glass-strong: rgba(14, 10, 6, 0.62);
  --line: rgba(212, 168, 87, 0.18);
  --line-strong: rgba(212, 168, 87, 0.38);
  --success: #5fb87a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  min-height: 100%;
  background: #07121f; /* fallback escuro pré-pintura, alinhado com styles.css da home */
}
body {
  min-height: 100vh;
  margin: 0;
  color: #f7eccd;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Sem background hardcoded: o .bg-art injetado pelo shared-chrome.js cuida do fundo.
     Quando NÃO há pintura ativa (data-pintura=""), styles.css já dá fallback escuro.
     A topbar do shared-chrome é position:sticky (ocupa lugar no fluxo), então
     o conteúdo abaixo dela já fica naturalmente posicionado — SEM padding-top. */
}
/* Quando há pintura ativa, esconde qualquer gradient legado */
body[data-pintura]:not([data-pintura=""]) {
  background: transparent;
}

/* ===== background ===== */
/* A Home esconde a pintura (WebGL canvas substitui) — aqui simplificamos:
   o gradient do body já dá o wash quente. A pintura fica invisível, presente
   no DOM apenas pra preload e símbolo. */
.bq-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bq-bg__painting { display: none; }
.bq-bg__veil { display: none; }

/* ===== pagehead (substituiu .bq-topbar; logo agora vem do shared-chrome) ===== */
.bq-pagehead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "mascote titlebar"
    "mascote filters";
  align-items: center;
  column-gap: clamp(16px, 2.4vw, 28px);
  row-gap: 8px;
  padding: 6px clamp(20px, 4vw, 56px) 8px;
  max-width: 1100px;
  margin: 0 auto;
  /* Sem isto o cabeçalho fica ESTÁTICO e a pintura de fundo (.bg-art, fixed,
     z-index 0) é pintada POR CIMA do texto dele: "presente da casa" e
     "Banco aberto de questões" existiam no layout e não apareciam em tela
     nenhuma (medido em 390px e em 1280px, 26/07). O <main class="bq-main">
     já era position:relative — era só o cabeçalho que ficou de fora. */
  position: relative;
  z-index: 1;
}
.bq-pagehead__mascote {
  grid-area: mascote;
  align-self: center;
  width: clamp(104px, 9.5vw, 148px);
  height: clamp(104px, 9.5vw, 148px);
  display: flex; align-items: center; justify-content: center;
}
.bq-pagehead__bar {
  grid-area: titlebar;
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(16px, 3vw, 32px);
}
.bq-pagehead .bq-filters { grid-area: filters; }
.bq-pagehead__mascote img {
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
  transition: opacity .35s ease, transform .35s ease;
  opacity: 0;  /* fade-in quando JS seta src */
}
.bq-pagehead__mascote img.is-loaded { opacity: 1; }
.bq-pagehead__mascote img.is-swapping { opacity: 0; transform: translateY(-4px); }
.bq-pagehead__center {
  text-align: left;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
}

/* Mobile: mascote + título na 1ª linha, filtros full-width abaixo */
@media (max-width: 720px) {
  .bq-pagehead {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "mascote titlebar"
      "filters filters";
    column-gap: 14px; row-gap: 12px;
  }
  .bq-pagehead__mascote { width: 72px; height: 72px; }
  .bq-pagehead__bar {
    flex-direction: column; align-items: flex-start; gap: 6px;
  }
  .bq-stat {
    flex-direction: row; gap: 8px; align-items: baseline;
    text-align: left; padding: 8px 14px;
  }
  /* No celular a página abre direto no mascote + acervo + filtros: o bloco de
     título sai do fluxo e a lista sobe ~100px (ordem do dono, 26/07, com print
     do antes e do depois). No desktop o título continua, agora visível. */
  .bq-pagehead__center { display: none; }
}

/* legado — mantido por algum tempo caso outra coisa referencie .bq-topbar */
.bq-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 26px clamp(20px, 4vw, 56px) 18px;
  max-width: 1380px;
  margin: 0 auto;
}

.bq-brand {
  justify-self: start;
  display: inline-flex; align-items: center;
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 12px;
  transition: opacity .25s, transform .25s;
  opacity: 0.92;
}
.bq-brand:hover, .bq-brand:focus-visible {
  opacity: 1;
  outline: none;
  transform: translateY(-1px);
}
.bq-brand__logo {
  height: 64px;
  width: auto;
  filter: drop-shadow(0 4px 10px rgba(31, 53, 82, 0.18));
}

.bq-topbar__center {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.bq-eyebrow {
  font-family: Caveat, cursive;
  font-size: 24px;
  color: #a87930;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}
.bq-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(28px, 4vmin, 46px);
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
  color: #1f3552;
}
.bq-title em {
  font-style: italic;padding-left:.18em;padding-right:.18em;margin-left:-.18em;margin-right:-.18em;
  background: linear-gradient(120deg, #b08530 0%, #d4a857 60%, #a87930 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bq-stat {
  justify-self: end;
  text-align: right;
  display: flex; flex-direction: column; align-items: flex-end;
  padding: 12px 20px;
  border-radius: 14px;
  background: rgba(255, 249, 235, 0.78);
  border: 1px solid rgba(168, 121, 48, 0.35);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 6px 18px rgba(31, 53, 82, 0.10);
}
.bq-stat strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600; font-size: 26px;
  color: #1f3552;
  line-height: 1;
  letter-spacing: -0.005em;
}
.bq-stat span {
  font-size: 16px;
  color: rgba(31, 53, 82, 0.6);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  margin-top: 3px;
}

/* ===== abas de área (Residência · Concursos · Vestibular) ===== */
.bq-areas {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4px clamp(20px, 4vw, 56px) 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  /* fade nas pontas pra indicar scroll, igual disciplinas */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.bq-areas::-webkit-scrollbar { height: 4px; }
.bq-areas::-webkit-scrollbar-thumb { background: rgba(212,168,87,.5); border-radius: 999px; }
.bq-area { flex: 0 0 auto; }  /* não encolhe na rolagem */
.bq-area {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 11px 22px 9px;
  border-radius: 14px;
  background: rgba(255, 249, 235, 0.55);
  border: 1px solid rgba(168, 121, 48, 0.22);
  color: #1f3552;
  font: 500 16px/1.2 Inter, sans-serif;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
  letter-spacing: 0.005em;
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
}
.bq-area:hover {
  background: rgba(255, 244, 213, 0.78);
  border-color: rgba(168, 121, 48, 0.42);
  transform: translateY(-1px);
}
.bq-area[aria-selected="true"] {
  background: linear-gradient(160deg, #fbe8b4, #d4a857 75%, #a87930);
  border-color: rgba(168, 121, 48, 0.7);
  color: #1a1208;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(168, 121, 48, 0.32);
}
.bq-area__label {
  font-size: 16px;
  letter-spacing: 0.005em;
}
.bq-area__count {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
  margin-top: 2px;
  color: #a87930;
  letter-spacing: -0.005em;
}
.bq-area[aria-selected="true"] .bq-area__count {
  color: #5c3a18;
}

.bq-aviso {
  margin: 6px 4px 0;
  padding: 9px 14px;
  background: rgba(255, 244, 213, 0.78);
  border-left: 3px solid #d4a857;
  border-radius: 6px;
  font: 400 16px/1.5 Inter, sans-serif;
  color: rgba(31, 53, 82, 0.78);
  letter-spacing: 0.005em;
}

.bq-loading {
  text-align: center;
  padding: 40px 20px;
  color: rgba(31, 53, 82, 0.55);
  font: 500 16px/1.5 "Cormorant Garamond", serif;
  font-style: italic;
}
.bq-loading__dots {
  display: inline-block;
  animation: bq-pulse-dots 1.4s ease-in-out infinite;
}
@keyframes bq-pulse-dots {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ===== main ===== */
.bq-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px clamp(20px, 4vw, 56px) 80px;
  display: flex; flex-direction: column;
  gap: 18px;
}

/* ===== filtros — vidro CREME claro pra casar com fundo dourado da Home ===== */
.bq-filters {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 249, 235, 0.72);
  border: 1px solid rgba(168, 121, 48, 0.28);
  border-radius: 18px;
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: 0 12px 36px rgba(31, 53, 82, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.bq-filters__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bq-filters__row--secondary > * { flex: 0 0 auto; }
.bq-filters__row--secondary .bq-search { flex: 1 1 280px; min-width: 220px; }

/* Linha 1 dos filtros: área + busca + limpar */
.bq-filters__row--primary { gap: 10px; }
.bq-filters__row--primary > .bq-search { flex: 1 1 260px; min-width: 200px; }

/* Linha 2: dropdowns dinâmicos por campo (gerados pelo JS via renderFilters) */
.bq-filters__row--dynamic {
  gap: 8px;
}
.bq-filters__row--dynamic:empty { display: none; }
.bq-filters__row--dynamic > * { flex: 0 0 auto; }

/* Caption do range (ex: "Ano") */
.bq-range__caption {
  font: 600 16px/1 Inter, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(31,53,82,.62);
  padding-right: 4px;
}
body[data-pintura]:not([data-pintura=""]) .bq-range__caption { color: rgba(247,236,205,.6); }

/* Busca interna do dropdown (dropdowns com muitas opções) */
.bq-dd__search {
  width: 100%;
  margin: 6px 4px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(168, 121, 48, 0.3);
  background: rgba(255, 255, 255, 0.55);
  color: #1f3552;
  font: 400 16px/1 Inter, sans-serif;
  outline: none;
  box-sizing: border-box;
}
.bq-dd__search:focus { border-color: rgba(168,121,48,.55); box-shadow: 0 0 0 2px rgba(212,168,87,.18); }
body[data-pintura]:not([data-pintura=""]) .bq-dd__search {
  background: rgba(14,10,6,.4); color: #f7eccd; border-color: rgba(212,168,87,.28);
}

.bq-pills {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.bq-pill {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(168, 121, 48, 0.28);
  color: #1f3552;
  font: 500 16px/1 Inter, sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;  /* nunca quebra texto interno da pill */
  flex: 0 0 auto;
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.bq-pill:hover, .bq-pill:focus-visible {
  background: rgba(255, 244, 213, 0.85);
  border-color: rgba(168, 121, 48, 0.55);
  color: #5c3a18;
  outline: none;
}
.bq-pill[aria-pressed="true"] {
  background: linear-gradient(160deg, #fbe8b4, #d4a857 75%, #a87930);
  border-color: rgba(168, 121, 48, 0.7);
  color: #1a1208;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(168, 121, 48, 0.25);
}
.bq-pill__count {
  font-size: 16px;
  font-weight: 400;
  color: rgba(31, 53, 82, 0.55);
}
.bq-pill[aria-pressed="true"] .bq-pill__count {
  color: rgba(26, 18, 8, 0.7);
}
.bq-pills--small .bq-pill { padding: 6px 11px; font-size: 16px; }

.bq-search {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 0 14px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(168, 121, 48, 0.28);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.bq-search:focus-within {
  border-color: rgba(168, 121, 48, 0.6);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(212, 168, 87, 0.18);
}
.bq-search svg { color: rgba(31, 53, 82, 0.55); }
.bq-search input {
  flex: 1; background: transparent; border: 0; color: #1f3552;
  font: 400 16px/1 Inter, sans-serif;
  outline: none;
  letter-spacing: 0.005em;
}
.bq-search input::placeholder { color: rgba(31, 53, 82, 0.45); }

.bq-range {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(168, 121, 48, 0.28);
}
.bq-range__label {
  font: 600 16px/1 Inter, sans-serif;
  color: #a87930;
  min-width: 36px; text-align: center;
}
.bq-range__dash { color: rgba(31, 53, 82, 0.4); font-size: 16px; }
.bq-range input[type="range"] {
  width: 90px;
  height: 4px;
  -webkit-appearance: none; appearance: none;
  background: rgba(168, 121, 48, 0.3);
  border-radius: 2px;
  outline: none;
}
.bq-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px;
  background: linear-gradient(160deg, #fbe8b4, #d4a857);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 1px #a87930, 0 2px 4px rgba(0,0,0,0.15);
}
.bq-range input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  background: linear-gradient(160deg, #fbe8b4, #d4a857);
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid #a87930;
}

.bq-select {
  height: 38px;
  padding: 0 32px 0 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a87930' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center/12px no-repeat;
  border: 1px solid rgba(168, 121, 48, 0.28);
  color: #1f3552;
  font: 500 16px/1 Inter, sans-serif;
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
  max-width: 220px;
}
.bq-select:focus { border-color: rgba(168, 121, 48, 0.6); outline: none; box-shadow: 0 0 0 3px rgba(212, 168, 87, 0.18); }
.bq-select option { background: #fdf7e7; color: #1f3552; }

.bq-clear {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: transparent;
  border: 1px dashed rgba(168, 121, 48, 0.4);
  color: rgba(31, 53, 82, 0.6);
  font: 500 16px/1 Inter, sans-serif;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-transform: lowercase;
  transition: color .2s, border-color .2s;
}
.bq-clear:hover { color: #5c3a18; border-color: #a87930; }

/* ===== results ===== */
.bq-results__meta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 6px;
  flex-wrap: wrap;
}
.bq-results__meta > span {
  font-size: 16px;
  color: rgba(31, 53, 82, 0.65);
  letter-spacing: 0.02em;
}
.bq-results__tools {
  display: inline-flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
/* Lista de cards (substituiu o card único) */
.bq-list {
  display: flex; flex-direction: column;
  gap: 18px;
}
.bq-list:empty { display: none; }

/* Controle de quantidade do lote: − 10 + */
.bq-qty {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 249, 235, 0.7);
  border: 1px solid rgba(168, 121, 48, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.bq-qty__label {
  font: 500 16px/1 Inter, sans-serif;
  color: #1f3552;
  letter-spacing: 0.02em;
}
/* Seletor de opções (5 · 10 · 20 · 50) no lugar do antigo − valor + */
.bq-qty__opts { display: inline-flex; gap: 3px; }
.bq-qty__opt {
  min-width: 32px; height: 26px; padding: 0 9px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  color: #1f3552;
  font: 600 16px/1 Inter, sans-serif;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s, border-color .15s;
}
.bq-qty__opt:hover { background: rgba(212, 168, 87, 0.2); color: #1a1208; }
.bq-qty__opt[aria-checked="true"] {
  background: rgba(212, 168, 87, 0.9);
  border-color: rgba(168, 121, 48, 0.55);
  color: #2a1c08;
}

.bq-foco-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 249, 235, 0.7);
  border: 1px solid rgba(168, 121, 48, 0.3);
  color: #1f3552;
  font: 500 16px/1 Inter, sans-serif;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.bq-foco-btn:hover { background: rgba(212,168,87,0.18); color: #1f3552; border-color: rgba(168, 121, 48, 0.55); }
.bq-foco-btn[aria-pressed="true"] {
  background: linear-gradient(160deg, #fbe8b4, #d4a857 75%, #a87930);
  color: #1a1208;
  border-color: rgba(168, 121, 48, 0.7);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(168, 121, 48, 0.25);
}

.bq-shuffle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 249, 235, 0.7);
  border: 1px solid rgba(168, 121, 48, 0.3);
  color: #1f3552;
  font: 500 16px/1 Inter, sans-serif;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.bq-shuffle:hover { background: rgba(212,168,87,0.18); color: #1f3552; border-color: rgba(168, 121, 48, 0.55); }

/* Erro no carregamento (substitui o limbo silencioso de antes) */
.bq-erro {
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(189, 80, 80, 0.10);
  border: 1px solid rgba(189, 80, 80, 0.35);
  color: #c44;
  font: 500 16px/1.5 Inter, sans-serif;
  text-align: center;
}
.bq-erro button {
  background: transparent; border: 0;
  color: var(--gold); font: inherit;
  text-decoration: underline; cursor: pointer;
  margin-left: 6px;
}

/* ===== card ===== */
.bq-card {
  position: relative;
  background: rgba(14,10,6,0.78);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: clamp(24px, 3.5vmin, 38px) clamp(24px, 3.5vmin, 42px);
  box-shadow: 0 28px 72px rgba(0,0,0,0.45), 0 8px 24px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,237,180,0.08);
  display: flex; flex-direction: column; gap: 22px;
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  transition: opacity .25s;
}
/* skeleton enquanto o conteúdo daquele card específico ainda não chegou
   (só pra placeholders durante o boot). NÃO bloqueia clique em cards reais. */
.bq-card.is-skeleton {
  opacity: 0.55;
  pointer-events: none;
  min-height: 220px;
}
.bq-card.is-skeleton .bq-card__statement,
.bq-card.is-skeleton .bq-card__alts,
.bq-card.is-skeleton .bq-card__foot { visibility: hidden; }

.bq-card__head {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 16px;
}
.bq-card__pill {
  display: inline-flex; align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(212,168,87,0.14);
  border: 1px solid rgba(212,168,87,0.32);
  color: var(--gold-light);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 16px;
}
.bq-card__pill[hidden] { display: none !important; }
.bq-card__pill--soft {
  background: transparent;
  border-color: var(--line);
  color: var(--text-mute);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 16px;
}

/* Pills clicáveis (vira filtro ao clicar). Botão real (não span). */
button.bq-card__pill,
.bq-card__pill--clickable {
  border: 1px solid rgba(212,168,87,0.32);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
button.bq-card__pill--soft.bq-card__pill--clickable {
  border-color: var(--line);
}
button.bq-card__pill.bq-card__pill--clickable:hover {
  background: rgba(212,168,87,0.28);
  border-color: rgba(212,168,87,0.6);
  color: var(--gold-light);
  transform: translateY(-1px);
}
button.bq-card__pill--soft.bq-card__pill--clickable:hover {
  background: rgba(212,168,87,0.12);
  color: var(--gold-light);
  border-color: rgba(212,168,87,0.4);
}
button.bq-card__pill--clickable:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ===== Barra de filtros ativos (chips com X + "só este" + "limpar todos") ===== */
.bq-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin: 0 0 12px;
  border-radius: 12px;
  background: rgba(255, 249, 235, 0.72);
  border: 1px solid rgba(168, 121, 48, 0.32);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
}
.bq-active-filters[hidden] { display: none; }
.bq-active-filters__label {
  font: 600 16px/1 Inter, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(31, 53, 82, 0.6);
  margin-right: 4px;
}
.bq-active-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 4px 4px 12px;
  border-radius: 999px;
  background: linear-gradient(160deg, #fbe8b4, #d4a857 75%, #a87930);
  color: #1a1208;
  font: 600 16px/1 Inter, sans-serif;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 6px rgba(168, 121, 48, 0.2);
}
.bq-active-chip__label {
  padding-right: 4px;
}
.bq-active-chip__only,
.bq-active-chip__x {
  background: rgba(26, 18, 8, 0.18);
  color: #1a1208;
  border: 0;
  border-radius: 999px;
  padding: 3px 8px;
  font: 700 16px/1 Inter, sans-serif;
  cursor: pointer;
  transition: background .15s, transform .12s;
}
.bq-active-chip__only:hover {
  background: rgba(26, 18, 8, 0.35);
}
.bq-active-chip__x {
  width: 22px; height: 22px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.bq-active-chip__x:hover {
  background: rgba(189, 80, 80, 0.55);
  color: #fff;
  transform: rotate(90deg);
}
.bq-active-filters__clear {
  margin-left: auto;
  background: transparent;
  border: 1px dashed rgba(168, 121, 48, 0.4);
  color: rgba(31, 53, 82, 0.7);
  padding: 6px 14px;
  border-radius: 999px;
  font: 600 16px/1 Inter, sans-serif;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color .15s, border-color .15s, background .15s;
}
.bq-active-filters__clear:hover {
  color: #5c3a18;
  border-color: #a87930;
  background: rgba(212, 168, 87, 0.12);
}

/* Variante pintura ativa (fundo escuro) — barra de filtros ativos */
body[data-pintura]:not([data-pintura=""]) .bq-active-filters {
  background: rgba(14, 10, 6, 0.55);
  border-color: rgba(212, 168, 87, 0.28);
}
body[data-pintura]:not([data-pintura=""]) .bq-active-filters__label {
  color: rgba(247, 236, 205, 0.62);
}
body[data-pintura]:not([data-pintura=""]) .bq-active-filters__clear {
  color: rgba(247, 236, 205, 0.7);
  border-color: rgba(212, 168, 87, 0.3);
}
body[data-pintura]:not([data-pintura=""]) .bq-active-filters__clear:hover {
  color: #fbe8b4;
  border-color: rgba(212, 168, 87, 0.6);
}

.bq-card__statement {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(23px, 2.7vmin, 30px);
  line-height: 1.45;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.005em;
}
/* Parágrafos do enunciado (texto-base separado do comando da questão).
   font/line-height: inherit é ESSENCIAL — sem isso os <p> pegavam a regra
   global `p{font-size:16px}` do styles.css e o enunciado encolhia quando
   tinha mais de um parágrafo (ficava menor que os de bloco único). */
.bq-card__statement p {
  margin: 0 0 0.65em;
  font: inherit;
  line-height: inherit;
  color: inherit;   /* sem isso, os <p> pegavam a cor AZUL da regra global p{color:#4a6181} */
}
.bq-card__statement p:last-child { margin-bottom: 0; }
/* Linha de fonte/crédito como legenda discreta (≥16px, regra de piso) */
.bq-card__statement p.bq-fonte {
  font-size: 16px;
  font-style: italic;
  opacity: 0.6;
}

.bq-card__alts {
  display: flex; flex-direction: column; gap: 10px;
}
.bq-card__alts[hidden] { display: none !important; }
.bq-alt {
  display: grid;
  grid-template-columns: auto 32px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255,247,219,0.035);
  border: 1px solid var(--line);
  color: var(--text);
  /* mesma família do enunciado, tamanho generoso — coesão tipográfica do card */
  font: 500 clamp(22px, 2.3vmin, 26px)/1.5 "Cormorant Garamond", Georgia, serif;
  cursor: pointer;
  text-align: left;
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
  width: 100%;
  user-select: none;
}
.bq-alt__text { line-height: 1.5; }
.bq-alt:hover { background: rgba(212,168,87,0.08); border-color: rgba(212,168,87,0.34); }
.bq-alt:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }
.bq-alt__label {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--gold);
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(212,168,87,0.12);
  border: 1px solid rgba(212,168,87,0.3);
  line-height: 1;
}
.bq-alt[aria-pressed="true"] {
  background: rgba(212,168,87,0.22);
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(212,168,87,0.55), 0 6px 16px rgba(212,168,87,0.18);
}
.bq-alt[aria-pressed="true"] .bq-alt__label {
  background: var(--gold);
  color: #1a1208;
  border-color: var(--gold-light);
  box-shadow: 0 2px 8px rgba(212,168,87,0.4);
}
/* Estados após revelar gabarito */
.bq-alt.is-correct {
  background: rgba(95, 184, 122, 0.15);
  border-color: rgba(95, 184, 122, 0.55);
}
.bq-alt.is-correct .bq-alt__label {
  background: rgba(95, 184, 122, 0.3);
  border-color: rgba(95, 184, 122, 0.6);
  color: #c2e8cf;
}
.bq-alt.is-wrong-marked {
  background: rgba(184, 80, 80, 0.08);
  border-color: rgba(184, 80, 80, 0.35);
  opacity: 0.7;
}

.bq-card__reveal {
  display: flex; align-items: baseline; gap: 12px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}

/* Resposta médica (formato Q&A aberto — consulta aberta) */
.bq-card__resposta-medica {
  margin-top: 8px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(212, 168, 87, 0.10), rgba(95, 184, 122, 0.08));
  border-left: 3px solid var(--gold);
  border-radius: 10px;
}
.bq-card__resposta-medica header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.bq-card__resposta-medica header span {
  font: 600 16px/1 Inter, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.bq-card__resposta-medica p {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(22px, 2.3vmin, 26px);
  line-height: 1.55;
  color: var(--text);
  margin: 0;
  letter-spacing: 0.005em;
  white-space: pre-wrap;
}
.bq-card__reveal span {
  font: 500 16px/1 Inter, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.bq-card__reveal strong {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: 32px;
  color: var(--gold-light);
  line-height: 1;
}
/* Explicação do gabarito (quando a fonte tiver) — quebra pra linha própria. */
.bq-card__explicacao {
  flex-basis: 100%;
  margin: 8px 0 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
}

.bq-card__foot {
  display: flex; gap: 10px; justify-content: space-between; align-items: center;
}
.bq-action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 22px;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--gold-light), var(--gold-mid) 55%, var(--gold-deep));
  color: #1a1208;
  font: 700 16px/1 Inter, sans-serif;
  letter-spacing: 0.02em;
  border: 0;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
  box-shadow: 0 6px 18px rgba(212,168,87,0.25);
}
.bq-action:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(212,168,87,0.35); }
.bq-action--ghost {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--line-strong);
  font-weight: 500;
  box-shadow: none;
}
.bq-action--ghost:hover { background: rgba(212,168,87,0.1); color: var(--text); box-shadow: none; }

.bq-empty {
  text-align: center;
  padding: 60px 20px;
  color: rgba(31, 53, 82, 0.6);
  font: 500 16px/1.5 "Cormorant Garamond", serif;
  font-style: italic;
}
.bq-empty button {
  background: transparent; border: 0; padding: 0;
  color: var(--gold);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.bq-footnote {
  /* Vive SOBRE a pintura, então precisa da mesma pastilha creme dos outros
     controles daqui: em azul-marinho a 50% direto na tela media 1,19:1. */
  text-align: center;
  color: #1f3552;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.005em;
  max-width: 600px;
  margin: 12px auto 0;
  display: table;
  padding: 8px 16px;
  border-radius: 14px;
  background: rgba(255, 249, 235, 0.82);
  border: 1px solid rgba(168, 121, 48, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.bq-footnote:empty { display: none; }

/* ===== responsive ===== */
@media (max-width: 720px) {
  .bq-topbar {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 18px;
    text-align: center;
  }
  .bq-back { justify-self: center; }
  .bq-stat { justify-self: center; flex-direction: row; align-items: baseline; gap: 8px; padding: 8px 14px; }
  .bq-stat strong { font-size: 18px; }
  .bq-stat span { margin-top: 0; }
  .bq-filters__row--secondary { flex-direction: column; align-items: stretch; }
  .bq-filters__row--secondary > * { width: 100%; max-width: none; }
  /* Em coluna, flex:1 1 280px viraria 280px de ALTURA — trava a busca em 38px */
  .bq-filters__row--secondary .bq-search { flex: 0 0 auto; height: 38px; }
  .bq-range { justify-content: space-between; }
  .bq-range input[type="range"] { flex: 1; }
  .bq-card { padding: 22px 18px; }
  .bq-card__statement { font-size: 25px; }
  .bq-alt { font-size: 22px; padding: 12px; }
  .bq-card__foot { flex-direction: column; gap: 8px; }
  .bq-card__foot > * { width: 100%; justify-content: center; }
}

/* ============================================================================
   consulta aberta — UI de resposta do aluno + feedback IA (formato Q&A aberto).
   ============================================================================ */
.bq-aberta-extra {
  margin-top: 14px;
  padding: 16px 18px;
  background: rgba(14, 10, 6, 0.35);
  border: 1px solid rgba(212, 168, 87, 0.22);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bq-aberta-extra__label {
  font: 600 16px/1 Inter, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(247, 236, 205, 0.7);
}
.bq-aberta-extra__textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  border: 1px solid rgba(212, 168, 87, 0.28);
  border-radius: 8px;
  background: rgba(14, 10, 6, 0.55);
  font: 400 16px/1.55 Inter, system-ui, sans-serif;
  color: #f7eccd;
  resize: vertical;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.bq-aberta-extra__textarea::placeholder { color: var(--ink-faint); }
html[data-skin="clean"] .bq-aberta-extra__textarea::placeholder { color: var(--clean-muted); }
.bq-aberta-extra__textarea:focus {
  outline: none;
  border-color: rgba(212, 168, 87, 0.7);
  background: rgba(14, 10, 6, 0.7);
  box-shadow: 0 0 0 3px rgba(212, 168, 87, 0.18);
}
.bq-aberta-extra__actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  flex-wrap: wrap;
}
.bq-action--primary {
  padding: 14px 30px;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(160deg, var(--gold-light), var(--gold-mid) 55%, var(--gold-deep));
  color: #1a1208;
  box-shadow: 0 10px 26px rgba(212, 168, 87, 0.4), inset 0 1px 0 rgba(255, 245, 215, 0.4);
}
.bq-action--primary:hover {
  background: linear-gradient(160deg, #fff2c7, var(--gold-light) 55%, var(--gold-mid));
  box-shadow: 0 14px 32px rgba(212, 168, 87, 0.5), inset 0 1px 0 rgba(255, 245, 215, 0.55);
}
.bq-action--primary:disabled { opacity: .55; cursor: wait; }
.bq-aberta-extra__hint {
  font: 400 16px/1.4 Inter, sans-serif;
  color: rgba(247, 236, 205, 0.6);
  font-style: italic;
}

.bq-aberta-feedback {
  /* harmonia com card escuro — texto claro, fundo escuro translúcido */
  --text: #f7eccd;
  --text-soft: rgba(247, 236, 205, 0.82);
  --text-mute: rgba(247, 236, 205, 0.6);
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(14, 10, 6, 0.45);
  border: 1px solid rgba(212, 168, 87, 0.22);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* PORTÃO DE LEGIBILIDADE desta caixa. O styles.css tem `p{color:#4a6181}`, que é
   tinta de superfície CLARA, e regra explícita vence herança: todo <p> criado
   aqui dentro nascia azul escuro sobre fundo escuro, por mais que a caixa
   declare cor. `:where` deixa a especificidade em zero, então as regras
   próprias abaixo (fonte, erro, gaps) continuam mandando. Vale para o que
   ainda vai ser escrito aqui, não só para o que existe hoje. */
.bq-aberta-feedback :where(p, li, h4, span, strong, em, b) { color: inherit; }
.bq-aberta-feedback--loading { color: var(--text-mute); font-style: italic; }
.bq-aberta-feedback--warn { background: rgba(212, 168, 87, 0.14); border-color: rgba(212, 168, 87, 0.5); }
.bq-aberta-feedback--error { background: rgba(189, 80, 80, 0.14); border-color: rgba(232, 138, 138, 0.55); }

.bq-aberta-feedback__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 8px; border-bottom: 1px dashed rgba(212, 168, 87, 0.28);
}
.bq-aberta-feedback__veredito {
  font: 700 16px/1 Inter, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bq-aberta-feedback__head--ok .bq-aberta-feedback__veredito { color: #8cd1a3; }
.bq-aberta-feedback__head--parcial .bq-aberta-feedback__veredito { color: #f0c878; }
.bq-aberta-feedback__head--errou .bq-aberta-feedback__veredito { color: #ec8e8e; }
.bq-aberta-feedback__head--impreciso .bq-aberta-feedback__veredito { color: #bdb9ad; }

.bq-aberta-feedback__source {
  font: 400 16px/1 Inter, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.bq-aberta-feedback__section {
  display: flex; flex-direction: column; gap: 4px;
}
.bq-aberta-feedback__section h4 {
  font: 600 16px/1 Inter, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0;
}
.bq-aberta-feedback__section ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bq-aberta-feedback__section li {
  font: 400 16px/1.55 Inter, sans-serif;
  color: var(--text);
}
.bq-aberta-feedback__section--gaps li { color: #f0c878; }
.bq-aberta-feedback__section--obs p {
  font: 400 16px/1.55 Inter, sans-serif;
  color: var(--text);
  margin: 0;
}
.bq-aberta-feedback__detail {
  font: 400 16px/1.4 ui-monospace, monospace;
  color: #ec8e8e;
  background: rgba(189, 80, 80, 0.16);
  padding: 6px 8px;
  border-radius: 6px;
  word-break: break-word;
}
.bq-aberta-feedback__hint {
  font: 400 16px/1.5 Inter, sans-serif;
  color: var(--text-mute);
  margin: 0;
}

/* =============================
   Concursos Certo/Errado — só a letra C ou E grande, sem texto auxiliar.
   Grid de 2 colunas (risco + letra ocupando o restante, letra centralizada).
   ============================= */
.bq-alt--ce {
  min-height: 78px;
  grid-template-columns: auto 1fr;
}
.bq-alt--ce .bq-alt__label {
  justify-self: center;
  width: 56px;
  height: 56px;
  font-size: 28px;
}

/* =============================
   Redação ENEM — tema + descrição + notas competência
   ============================= */
.bq-redacao__tema {
  display: block;
  font: 600 clamp(22px, 2.3vmin, 27px)/1.3 "Cormorant Garamond", Georgia, serif;
  color: var(--text);
  margin-bottom: 10px;
}
.bq-redacao__desc {
  display: block;
  /* texto do tema/motivador: mesma família e cor sólida do enunciado (era
     Inter 16 apagado — destoava de tudo) */
  font: 500 clamp(22px, 2.3vmin, 26px)/1.5 "Cormorant Garamond", Georgia, serif;
  color: var(--text);
  white-space: pre-wrap;
}
.bq-redacao__notas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 10px 0 14px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.03);
  border-radius: 8px;
  font: 500 16px/1.4 ui-monospace, monospace;
}
.bq-redacao__notas span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.bq-redacao__notas strong {
  font-weight: 700;
  color: var(--text-mute);
  font-size: 16px;
}
.bq-redacao__comentario {
  margin-top: 12px;
  border-top: 1px dashed rgba(0,0,0,0.12);
  padding-top: 10px;
}
.bq-redacao__comentario summary {
  cursor: pointer;
  font: 500 16px/1.4 Inter, sans-serif;
  color: var(--text-mute);
}
.bq-redacao__comentario p {
  margin: 8px 0 0;
  font: 400 16px/1.55 Inter, sans-serif;
}

/* =====================================================================
   ADAPTAÇÃO PRA FUNDO DE PINTURA (shared-chrome.js ativo)
   ---------------------------------------------------------------------
   A paleta original foi calibrada pra fundo creme. Quando há pintura
   ativa (body[data-pintura] preenchido), toda a UI vira "vidro fumê" —
   superfícies translúcidas escuras com texto claro, alinhado com a Home.
   ===================================================================== */

body[data-pintura]:not([data-pintura=""]) .bq-title {
  color: #f7eccd;
  text-shadow: 0 2px 14px rgba(0,0,0,.4);
}
body[data-pintura]:not([data-pintura=""]) .bq-eyebrow {
  color: #e8c477;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}
/* Véu escuro atrás do título: com a pintura clara (Botticelli, girassóis) o
   dourado do "Banco aberto" some no fundo. Mesma solução da Home (.amb__label). */
body[data-pintura]:not([data-pintura=""]) .bq-pagehead__center { position: relative; }
body[data-pintura]:not([data-pintura=""]) .bq-pagehead__center::before {
  content: ""; position: absolute; z-index: -1; inset: -16px -40px; pointer-events: none;
  background: radial-gradient(115% 210% at 34% 50%,
    rgba(3,5,16,.88) 0%, rgba(3,5,16,.74) 52%, rgba(3,5,16,.30) 82%, rgba(3,5,16,0) 100%);
  filter: blur(9px);
}

body[data-pintura]:not([data-pintura=""]) .bq-stat {
  background: rgba(14,10,6,.55);
  border-color: rgba(212,168,87,.32);
  color: #f7eccd;
  -webkit-backdrop-filter: blur(14px) saturate(1.18);
  backdrop-filter: blur(14px) saturate(1.18);
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}
body[data-pintura]:not([data-pintura=""]) .bq-stat strong { color: #fbe8b4; }
body[data-pintura]:not([data-pintura=""]) .bq-stat span { color: rgba(247,236,205,.62); }

body[data-pintura]:not([data-pintura=""]) .bq-area {
  background: rgba(14,10,6,.42);
  border-color: rgba(212,168,87,.22);
  color: rgba(247,236,205,.92);
}
body[data-pintura]:not([data-pintura=""]) .bq-area:hover {
  background: rgba(14,10,6,.62);
  border-color: rgba(212,168,87,.5);
}
body[data-pintura]:not([data-pintura=""]) .bq-area__count { color: rgba(232,196,119,.85); }
/* selecionado mantém o gradient dourado original (já contrasta bem) */

body[data-pintura]:not([data-pintura=""]) .bq-filters {
  background: rgba(14,10,6,.55);
  border-color: rgba(212,168,87,.22);
  box-shadow: 0 14px 40px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,237,180,.06);
}
body[data-pintura]:not([data-pintura=""]) .bq-aviso {
  background: rgba(212,168,87,.10);
  color: rgba(247,236,205,.82);
  border-left-color: #d4a857;
}

body[data-pintura]:not([data-pintura=""]) .bq-pill {
  background: rgba(247,236,205,.06);
  border-color: rgba(212,168,87,.28);
  color: #f7eccd;
}
body[data-pintura]:not([data-pintura=""]) .bq-pill:hover,
body[data-pintura]:not([data-pintura=""]) .bq-pill:focus-visible {
  background: rgba(247,236,205,.14);
  border-color: rgba(212,168,87,.55);
  color: #fbe8b4;
}
body[data-pintura]:not([data-pintura=""]) .bq-pill__count { color: rgba(247,236,205,.5); }

body[data-pintura]:not([data-pintura=""]) .bq-search input,
body[data-pintura]:not([data-pintura=""]) .bq-search {
  background: rgba(14,10,6,.55);
  border-color: rgba(212,168,87,.28);
  color: #f7eccd;
}
body[data-pintura]:not([data-pintura=""]) .bq-search input::placeholder { color: rgba(247,236,205,.42); }

body[data-pintura]:not([data-pintura=""]) .bq-select,
body[data-pintura]:not([data-pintura=""]) .bq-range {
  background: rgba(14,10,6,.55);
  border-color: rgba(212,168,87,.28);
  color: #f7eccd;
}
body[data-pintura]:not([data-pintura=""]) .bq-range__label,
body[data-pintura]:not([data-pintura=""]) .bq-range__dash { color: rgba(247,236,205,.65); }

body[data-pintura]:not([data-pintura=""]) .bq-card {
  background: rgba(14,10,6,.62);
  border: 1px solid rgba(212,168,87,.22);
  color: #f7eccd;
  -webkit-backdrop-filter: blur(16px) saturate(1.18);
  backdrop-filter: blur(16px) saturate(1.18);
  box-shadow: 0 16px 44px rgba(0,0,0,.4);
}
body[data-pintura]:not([data-pintura=""]) .bq-card__statement { color: #f7eccd; }
body[data-pintura]:not([data-pintura=""]) .bq-card__pill {
  background: rgba(212,168,87,.18); color: #fbe8b4; border-color: rgba(212,168,87,.4);
}
body[data-pintura]:not([data-pintura=""]) .bq-card__pill--soft {
  background: rgba(247,236,205,.06); color: rgba(247,236,205,.78);
}
body[data-pintura]:not([data-pintura=""]) .bq-alt {
  background: rgba(247,236,205,.04);
  border-color: rgba(212,168,87,.20);
  color: #f7eccd;
}
body[data-pintura]:not([data-pintura=""]) .bq-alt:hover { background: rgba(247,236,205,.10); border-color: rgba(212,168,87,.42); }
body[data-pintura]:not([data-pintura=""]) .bq-action {
  background: rgba(212,168,87,.18); color: #fbe8b4; border-color: rgba(212,168,87,.4);
}
/* Botão primário mantém o gradient dourado mesmo com pintura ativa —
   é a ação principal do card (obter feedback), não pode enfraquecer */
body[data-pintura]:not([data-pintura=""]) .bq-action--primary {
  background: linear-gradient(160deg, var(--gold-light), var(--gold-mid) 55%, var(--gold-deep));
  color: #1a1208;
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(212, 168, 87, 0.4), inset 0 1px 0 rgba(255, 245, 215, 0.4);
}
body[data-pintura]:not([data-pintura=""]) .bq-action--primary:hover {
  background: linear-gradient(160deg, #fff2c7, var(--gold-light) 55%, var(--gold-mid));
  box-shadow: 0 14px 32px rgba(212, 168, 87, 0.5), inset 0 1px 0 rgba(255, 245, 215, 0.55);
}

body[data-pintura]:not([data-pintura=""]) .bq-clear,
body[data-pintura]:not([data-pintura=""]) .bq-shuffle {
  background: transparent; color: rgba(247,236,205,.62); border-color: rgba(212,168,87,.22);
}

/* =====================================================================
   MODO FOCO — port fiel do cinema-mode da apostila HTMLzão
   (material-novo2.html linhas 6921-7037 e JS 24499-24693)
   ---------------------------------------------------------------------
   Quando body.bq-foco está ativo:
     - Todos os cards ficam dim (opacity .18, blur, saturate, scale .985)
     - O card "ativo" (.is-focused) volta nítido com sombra dourada
     - Cabeçalho + filtros + toolbar ficam em opacity .35, restauram no hover
     - Fundo da página vira escuro liso (sem pintura no caminho)
   ===================================================================== */
body.bq-foco { background: #0a0e1a; }
body.bq-foco .bq-bg__painting { opacity: .15; transition: opacity .35s; }
body.bq-foco:hover .bq-bg__painting { opacity: .35; }

.bq-card {
  transition: opacity .35s ease, transform .35s ease, filter .35s ease, box-shadow .35s ease;
}
body.bq-foco .bq-card {
  opacity: 0.18;
  filter: blur(0.5px) saturate(0.7);
  transform: scale(0.985);
}
body.bq-foco .bq-card.is-focused {
  opacity: 1;
  filter: none;
  transform: scale(1);
  box-shadow:
    0 0 0 2px rgba(212, 168, 87, 0.55),
    0 30px 60px -18px rgba(0,0,0,.55),
    0 8px 24px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,237,180,0.10);
}
body.bq-foco .bq-pagehead,
body.bq-foco .bq-results__meta {
  opacity: 0.35;
  transition: opacity .25s;
}
body.bq-foco .bq-pagehead:hover,
body.bq-foco .bq-pagehead:focus-within,
body.bq-foco .bq-results__meta:hover,
body.bq-foco .bq-results__meta:focus-within {
  opacity: 1;
}

/* Toast — pílula no canto superior direito, fadein/fadeout */
.bq-foco-toast {
  position: fixed; top: 14px; right: 14px; z-index: 10020;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(160deg, #fbe8b4, #d4a857 75%, #a87930);
  color: #1a1208;
  font: 700 16px/1 Inter, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 6px 16px -4px rgba(168, 121, 48, 0.55);
  opacity: 0; transform: translateY(-6px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.bq-foco-toast.is-on { opacity: 1; transform: translateY(0); }

/* Modal de ajuda de atalhos — disparado por "?" */
.bq-kbd-help-overlay {
  position: fixed; inset: 0; z-index: 10030;
  background: rgba(7, 4, 10, .65);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .18s;
  padding: 24px;
}
.bq-kbd-help-overlay.is-open { opacity: 1; pointer-events: auto; }
.bq-kbd-help-card {
  background: #1a1208; color: #f7eccd;
  border: 1px solid rgba(212,168,87,.3);
  border-radius: 16px;
  padding: 24px 28px;
  max-width: 480px; width: 100%;
  box-shadow: 0 20px 60px -10px rgba(0,0,0,.6);
  font: 16px/1.5 Inter, sans-serif;
  transform: translateY(8px); transition: transform .18s;
}
.bq-kbd-help-overlay.is-open .bq-kbd-help-card { transform: translateY(0); }
.bq-kbd-help-card h3 {
  margin: 0 0 14px;
  font: 600 18px/1.2 "Cormorant Garamond", serif;
  color: #fbe8b4;
  letter-spacing: -0.005em;
}
.bq-kbd-help-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 10px;
}
.bq-kbd-help-list li {
  display: flex; align-items: center; gap: 12px;
  color: rgba(247, 236, 205, .9);
  font-size: 16px;
}
.bq-kbd-help-list kbd {
  display: inline-block;
  min-width: 26px; text-align: center;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(247, 236, 205, .08);
  border: 1px solid rgba(212, 168, 87, .35);
  font: 600 16px/1 ui-monospace, monospace;
  color: #fbe8b4;
  box-shadow: 0 1px 0 rgba(0,0,0,.4);
}
.bq-kbd-help-card .bq-kbd-close {
  margin-top: 18px; padding: 8px 18px;
  border-radius: 8px;
  background: linear-gradient(160deg, #fbe8b4, #d4a857 75%, #a87930);
  color: #1a1208;
  border: 0; cursor: pointer;
  font: 700 16px/1 Inter, sans-serif;
  letter-spacing: 0.02em;
}
.bq-kbd-help-card .bq-kbd-close:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -3px rgba(168, 121, 48, .4); }
.bq-kbd-help-card__footer {
  margin-top: 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.bq-kbd-help-card__hint {
  font-size: 16px;
  color: rgba(247, 236, 205, .5);
  font-style: italic;
}

/* Botão "?" pra abrir ajuda — discreto, ao lado do modo foco */
.bq-help-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255, 249, 235, 0.7);
  border: 1px solid rgba(168, 121, 48, 0.3);
  color: rgba(31, 53, 82, 0.65);
  font: 700 16px/1 Inter, sans-serif;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  transition: background .2s, color .2s, border-color .2s, transform .12s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.bq-help-btn:hover { background: rgba(212,168,87,0.2); color: #1f3552; transform: translateY(-1px); }

/* =====================================================================
   PÍLULAS DE DISCIPLINA EM 1 LINHA COM SCROLL HORIZONTAL
   ---------------------------------------------------------------------
   Antes ocupavam 2-3 linhas em telas médias (Residência médica tem ~12
   disciplinas). Vira scroll horizontal só na linha principal de pílulas
   (#bq-categoria-pills); a linha secundária (.bq-filters__row--secondary)
   mantém wrap pra busca/range/select.
   ===================================================================== */
.bq-filters__row--disciplines {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(212,168,87,.5) transparent;
  /* fade nas pontas pra indicar scroll */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  padding-bottom: 4px;
}
.bq-filters__row--disciplines #bq-categoria-pills {
  flex-wrap: nowrap;
  width: max-content;
}
.bq-filters__row--disciplines::-webkit-scrollbar { height: 4px; }
.bq-filters__row--disciplines::-webkit-scrollbar-track { background: transparent; }
.bq-filters__row--disciplines::-webkit-scrollbar-thumb { background: rgba(212,168,87,.5); border-radius: 999px; }


/* =====================================================================
   ÁREA + DISCIPLINA COMO MENUS (substituem os 7 botões e o paredão de pills)
   ===================================================================== */
.bq-select--area {
  max-width: none;
  min-width: 210px;
  font-weight: 600;
}

/* Dropdown custom de disciplina (multiselect) — z-index alto definido mais abaixo */
.bq-dd__trigger {
  display: inline-flex; align-items: center; gap: 10px;
  height: 38px;
  padding: 0 14px;
  min-width: 190px; max-width: 280px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(168, 121, 48, 0.28);
  color: #1f3552;
  font: 500 16px/1 Inter, sans-serif;
  cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.bq-dd__trigger:hover { border-color: rgba(168, 121, 48, 0.5); background: rgba(255,255,255,0.78); }
.bq-dd[data-open="true"] .bq-dd__trigger {
  border-color: rgba(168, 121, 48, 0.6);
  box-shadow: 0 0 0 3px rgba(212, 168, 87, 0.18);
}
.bq-dd__label {
  flex: 1; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bq-dd__trigger svg { color: #a87930; transition: transform .2s; flex: 0 0 auto; }
.bq-dd[data-open="true"] .bq-dd__trigger svg { transform: rotate(180deg); }
/* contador de selecionadas no trigger */
.bq-dd__badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(160deg, #fbe8b4, #d4a857 75%, #a87930);
  color: #1a1208; font: 700 16px/1 Inter, sans-serif;
  flex: 0 0 auto;
}

/* Dropdown: o PAINEL é position:fixed pra escapar dos contextos de
   empilhamento criados pelos cards (que usam backdrop-filter e ficam
   sobre qualquer z-index do header). O JS calcula top/left a partir
   do trigger via getBoundingClientRect e seta inline. */
.bq-dd { position: relative; flex: 0 0 auto; }
.bq-dd__panel {
  position: fixed; top: 0; left: 0;
  z-index: 10050;
  width: max(100%, 280px); max-width: 360px;
  max-height: 340px; overflow-y: auto;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 250, 238, 0.97);
  border: 1px solid rgba(168, 121, 48, 0.4);
  box-shadow: 0 18px 44px rgba(31, 53, 82, 0.22);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  scrollbar-width: thin; scrollbar-color: rgba(212,168,87,.5) transparent;
}
.bq-dd__panel[hidden] { display: none; }
.bq-dd__panel::-webkit-scrollbar { width: 6px; }
.bq-dd__panel::-webkit-scrollbar-thumb { background: rgba(212,168,87,.5); border-radius: 999px; }
.bq-dd__item {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  width: 100%;
  padding: 8px 11px;
  border-radius: 8px;
  background: transparent; border: 0;
  color: #1f3552;
  font: 500 16px/1.3 Inter, sans-serif;
  text-align: left; cursor: pointer;
  transition: background .15s, color .15s;
}
.bq-dd__item:hover { background: rgba(212, 168, 87, 0.14); }
.bq-dd__item[aria-selected="true"] {
  background: linear-gradient(160deg, #fbe8b4, #d4a857 80%, #a87930);
  color: #1a1208; font-weight: 700;
}
.bq-dd__item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bq-dd__item-count { font-size: 16px; font-weight: 400; color: rgba(31, 53, 82, 0.5); flex: 0 0 auto; }
.bq-dd__item[aria-selected="true"] .bq-dd__item-count { color: rgba(26, 18, 8, 0.65); }
.bq-dd__sep { height: 1px; background: rgba(168, 121, 48, 0.2); margin: 6px 4px; }
.bq-dd__more { font-size: 16px; color: rgba(31, 53, 82, 0.6); padding: 8px 12px 4px; text-align: center; font-style: italic; }
body[data-pintura]:not([data-pintura=""]) .bq-dd__more { color: rgba(247,236,205,.6); }

/* A tela de carregamento do bichinho mora em /telos-boot-mascote.css (uma só
   para o banco e para a area do aluno). */

/* Variantes pra fundo de pintura ativo (vidro fumê) — dropdown + área */
body[data-pintura]:not([data-pintura=""]) .bq-dd__trigger {
  background: rgba(14,10,6,.55); border-color: rgba(212,168,87,.28); color: #f7eccd;
}
body[data-pintura]:not([data-pintura=""]) .bq-dd__trigger svg { color: rgba(247,236,205,.65); }
body[data-pintura]:not([data-pintura=""]) .bq-dd__panel {
  background: rgba(18,13,8,.96); border-color: rgba(212,168,87,.3);
  box-shadow: 0 18px 44px rgba(0,0,0,.5);
}
body[data-pintura]:not([data-pintura=""]) .bq-dd__item { color: #f7eccd; }
body[data-pintura]:not([data-pintura=""]) .bq-dd__item:hover { background: rgba(247,236,205,.10); }
body[data-pintura]:not([data-pintura=""]) .bq-dd__item-count { color: rgba(247,236,205,.5); }
body[data-pintura]:not([data-pintura=""]) .bq-dd__sep { background: rgba(212,168,87,.22); }

@media (max-width: 720px) {
  .bq-select--area, .bq-dd, .bq-dd__trigger { width: 100%; max-width: none; }
  .bq-dd__panel { max-width: none; }
}

/* =====================================================================
   TOPBAR — canto superior esquerdo IDÊNTICO ao da Home.
   O padding-left de 140px que existia aqui era remendo desta tela pro
   defeito de classe (toggles em cima do wordmark). A reserva agora é
   calculada pelo cabeçalho compartilhado, em styles.css, e vale pra toda
   página que clona a topbar. Sobrou só o tamanho do link de login.
   ===================================================================== */
body[data-tela="banco-de-questoes"] .topbar-link { font-size: 16px; font-weight: 600; }

/* =====================================================================
   BOTÕEZINHOS DE RISCO + CONFIRMAÇÃO COM CERTEZA
   ---------------------------------------------------------------------
   Cada alternativa tem 3 botõezinhos à esquerda (?, …, ✕) pra marcar
   grau de confiança. Embaixo, 2 botões finais ("Tô achando" / "Tenho
   certeza") que confirmam a resposta. Veredito mostrado depois cobre
   4 combinações (acertou×certeza, acertou×achismo, errou×achismo,
   errou×certeza). Portado do aluno.js (modo overlay do átomo).
   ===================================================================== */

/* Coluna dos 3 botõezinhos à esquerda da alternativa */
.bq-alt__risc {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 0 0 auto;
  align-self: stretch;
  justify-content: center;
}
.bq-risc-btn {
  width: 26px; height: 22px;
  border-radius: 5px;
  border: 1px solid rgba(212,168,87,0.28);
  background: rgba(12,7,9,0.48);
  color: rgba(247,236,205,0.62);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-weight: 800;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s, transform .12s;
}
.bq-risc-btn--palpite:hover {
  background: rgba(252,211,77,0.22);
  color: #fcd34d;
  border-color: rgba(252,211,77,0.6);
}
.bq-risc-btn--leve:hover,
.bq-risc-btn--forte:hover {
  background: rgba(232,136,136,0.22);
  color: rgba(232,136,136,0.95);
  border-color: rgba(232,136,136,0.55);
}
/* Estado ativo (botãozinho marcado pelo aluno) — contraste alto e cor
   intencional pra cada grau, com halo (box-shadow) que destaca contra
   o fundo escuro do card. */
.bq-alt[data-risco="palpite"] .bq-risc-btn--palpite {
  background: #fcd34d;
  color: #1a1208;
  border-color: #fcd34d;
  box-shadow: 0 0 0 2px rgba(252,211,77,0.35);
  font-weight: 900;
}
.bq-alt[data-risco="leve"] .bq-risc-btn--leve {
  background: #d96572;
  color: #fff;
  border-color: #d96572;
  box-shadow: 0 0 0 2px rgba(217,101,114,0.35);
  font-weight: 900;
}
.bq-alt[data-risco="forte"] .bq-risc-btn--forte {
  background: #c0202f;
  color: #fff;
  border-color: #c0202f;
  box-shadow: 0 0 0 2px rgba(192,32,47,0.4);
  font-weight: 900;
}

/* Estados visuais da linha riscada (texto cortado / esmaecido) */
.bq-alt[data-risco="leve"] .bq-alt__text {
  opacity: .6;
  text-decoration: line-through;
  text-decoration-style: dotted;
  text-decoration-color: rgba(232,136,136,0.7);
  text-decoration-thickness: 1.5px;
}
.bq-alt[data-risco="forte"] .bq-alt__text {
  opacity: .35;
  text-decoration: line-through;
  text-decoration-thickness: 3px;
  text-decoration-color: #9a2030;
  color: rgba(232,136,136,0.65);
}
.bq-alt[data-risco="palpite"]:not([aria-pressed="true"]) {
  background: rgba(212,168,87,0.12);
  border-color: rgba(212,168,87,0.42);
}
.bq-alt[data-risco="leve"]:not([aria-pressed="true"]) {
  background: rgba(232,136,136,0.08);
  border-color: rgba(232,136,136,0.32);
}
.bq-alt[data-risco="forte"]:not([aria-pressed="true"]) {
  background: rgba(154,32,48,0.12);
  border-color: rgba(154,32,48,0.48);
}

/* Pra Certo/Errado: os 2 botões são bem maiores; centraliza coluna de risco */
.bq-alt--ce .bq-alt__risc { justify-content: center; }

/* Dois botões finais — "Tô achando" (ghost) e "Tenho certeza" (sólido).
   Contraste forte pra que o aluno faça a escolha consciente. */
.bq-cert {
  display: flex;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}
.bq-cert[hidden] { display: none; }
.bq-cert-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 10px;
  font: 700 16px/1.1 Inter, sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s, background .15s, filter .12s;
  white-space: nowrap;
}
.bq-cert-btn--achando {
  border: 1px solid rgba(212,168,87,0.55);
  background: transparent;
  color: var(--gold-light);
}
.bq-cert-btn--achando:hover:not(:disabled) {
  background: rgba(212,168,87,0.12);
  border-color: var(--gold);
}
.bq-cert-btn--certo {
  border: 0;
  background: linear-gradient(160deg, var(--gold-light), var(--gold-mid) 55%, var(--gold-deep));
  color: #1a1208;
  box-shadow: 0 6px 18px rgba(212,168,87,0.28);
}
.bq-cert-btn--certo:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(212,168,87,0.4);
}
.bq-cert-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.15);
}

/* Veredito mostrado depois que o aluno confirma. 4 variantes (verde forte,
   verde morno, laranja, vermelho forte) — cobre a matriz 2×2 de acerto×certeza. */
.bq-veredito {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  font: 700 16px/1.1 Inter, sans-serif;
  letter-spacing: 0.01em;
  border: 1px solid;
}
.bq-veredito[hidden] { display: none; }
.bq-veredito__icon {
  font-size: 18px;
  line-height: 1;
}
.bq-veredito--acertou-certo {
  background: rgba(95,184,122,0.22);
  border-color: rgba(95,184,122,0.65);
  color: #c2e8cf;
}
.bq-veredito--acertou-achismo {
  background: rgba(95,184,122,0.10);
  border-color: rgba(95,184,122,0.4);
  color: #b3dcc0;
}
.bq-veredito--errou-achismo {
  background: rgba(232,168,80,0.18);
  border-color: rgba(232,168,80,0.55);
  color: #f0d9a8;
}
.bq-veredito--errou-certo {
  background: rgba(184,80,80,0.22);
  border-color: rgba(184,80,80,0.65);
  color: #f5c8c8;
}

/* Botão pequeno "↻ refazer" — aparece junto do veredito pra quem quer
   apagar a resposta salva e tentar de novo. */
.bq-refazer {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-mute);
  padding: 8px 14px;
  border-radius: 8px;
  font: 500 16px/1 Inter, sans-serif;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.bq-refazer[hidden] { display: none; }
.bq-refazer:hover {
  background: rgba(212,168,87,0.08);
  color: var(--text);
  border-color: var(--line-strong);
}

/* Empilha no mobile pra evitar quebra estranha */
@media (max-width: 560px) {
  .bq-card__foot {
    flex-wrap: wrap;
    gap: 8px;
  }
  .bq-cert { width: 100%; }
  .bq-veredito { width: 100%; justify-content: center; }
  .bq-refazer { width: 100%; }
  .bq-risc-btn { width: 24px; height: 20px; font-size: 16px; }
}



/* ============================================================================
 * CELULAR: UMA LINHA SÓ DE CONTROLES (ordem do dono, 28/07)
 * "por página 5 10 20 50" ocupava uma linha e "modo foco" + "embaralhar"
 * ocupavam outra, comendo a tela antes da primeira questão. No celular os dois
 * botões viram ÍCONE (o texto sai, o title e o aria-label continuam contando o
 * que são), e tudo cabe ao lado do seletor. No computador nada muda.
 * ========================================================================== */
@media (max-width: 680px) {
  /* O `shuffle` saía 7px pra fora da tela: os 3 filhos somavam mais que a
     largura. `min-width:0` deixa a pílula encolher, e o rótulo em uma linha só
     evita que ela cresça em altura. */
  .bq-results__tools { flex-wrap: nowrap; gap: 6px; width: 100%; }
  .bq-qty { flex: 1 1 auto; min-width: 0; justify-content: space-between; padding: 4px 8px; }
  .bq-qty__label { white-space: nowrap; }
  .bq-qty__opt { min-width: 28px; padding: 0 6px; }
  .bq-foco-btn span, .bq-shuffle span { display: none; }
  .bq-foco-btn, .bq-shuffle {
    flex: 0 0 auto;
    width: 44px; height: 44px;           /* alvo de dedo, igual aos presentes da home */
    padding: 0; justify-content: center;
    touch-action: manipulation;
  }
  .bq-foco-btn svg, .bq-shuffle svg { width: 20px; height: 20px; }
}

/* ==========================================================================
 * PRÓXIMA LEVA ("mostrar mais questões")
 * O botão traz a leva seguinte do mesmo filtro e acrescenta ao fim da lista.
 * Usa o botão dourado que já existe nos cards (.bq-action) e, quando o filtro
 * acaba, a mesma pastilha creme do rodapé, porque vive sobre a pintura.
 * ========================================================================== */
.bq-more {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin: 6px 0 2px;
}
.bq-more[hidden] { display: none; }
.bq-more [hidden] { display: none; }
.bq-more__fim {
  margin: 0;
  padding: 8px 16px;
  border-radius: 14px;
  background: rgba(255, 249, 235, 0.82);
  border: 1px solid rgba(168, 121, 48, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #1f3552;
  font: 500 16px/1.5 Inter, sans-serif;
  text-align: center;
}
.bq-action[disabled] { opacity: .55; cursor: default; transform: none; }

/* No celular a barra de ferramentas tinha três pílulas em uma linha só. Com a
 * ordem, a linha não cabe: a ordem sobe pra uma linha própria e as outras três
 * continuam juntas embaixo, como já estavam. */
@media (max-width: 680px) {
  /* Duas linhas: em cima a ordem com o embaralhar, que é a ação de sortear;
     embaixo a quantidade com o modo foco. O rótulo "Ordem" sai no celular, como
     já sai o texto dos botões de ícone, e o nome de cada opção continua inteiro. */
  .bq-results__tools { flex-wrap: wrap; }
  .bq-qty--ordem { order: -2; flex: 0 1 auto; }
  .bq-qty--ordem .bq-qty__label { display: none; }
  .bq-shuffle { order: -1; }
}

/* O contador vive SOBRE a pintura, do lado das pílulas creme, e em azul-marinho
 * direto na tela ele some no escuro do quadro. Mesma pastilha do rodapé e dos
 * controles vizinhos, que é a linguagem já usada aqui pra texto sobre a arte. */
.bq-results__meta > span:not(:empty) {
  color: #1f3552;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 249, 235, 0.82);
  border: 1px solid rgba(168, 121, 48, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* O aviso de carregamento aparece quando a ordem muda e quando a próxima leva
 * vem do banco. Como o contador, ele vive sobre a pintura e precisa da mesma
 * pastilha creme para ser lido. */
.bq-loading {
  color: #1f3552;
  max-width: 420px;
  margin: 16px auto;
  padding: 10px 18px;
  border-radius: 14px;
  background: rgba(255, 249, 235, 0.82);
  border: 1px solid rgba(168, 121, 48, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
