/* DC Tools — mobile-first, tema #39A8DB + Inter */

.dc-tool {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: #1a2b3c;
  margin: 0 0 2rem;
  position: static;
  overflow: visible;
  min-height: auto;
  z-index: auto;
}

.dc-tool.has-result::after {
  content: "";
  display: block;
  clear: both;
}

.dc-tool__layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow: visible;
  min-height: auto;
}

.dc-tool__panel {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2ebf2;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(57, 168, 219, 0.08);
}

.dc-tool__controls {
  flex: 0 0 auto;
}

.dc-tool__output {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.dc-tool.has-result .dc-tool__output,
.dc-tool__output.has-content {
  border-color: #c5deee;
  background: linear-gradient(180deg, #f8fcff 0%, #fff 120px);
  flex: none;
  min-height: auto;
  height: auto;
  max-height: none;
  overflow: visible;
}

.dc-tool.has-result .dc-tool__controls {
  box-shadow: 0 2px 12px rgba(57, 168, 219, 0.06);
}

.dc-tool__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #2d8dba;
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dc-tool__input,
.dc-tool__select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #c5deee;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  color: #1a2b3c;
  background: #f8fcff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dc-tool__input:focus,
.dc-tool__select:focus {
  outline: none;
  border-color: #39A8DB;
  box-shadow: 0 0 0 3px rgba(57, 168, 219, 0.2);
}

.dc-tool__field {
  margin-bottom: 1rem;
}

.dc-tool__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.dc-tool__chip {
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 1.5px solid #c5deee;
  border-radius: 999px;
  background: #fff;
  color: #2d8dba;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.dc-tool__chip:hover,
.dc-tool__chip.is-active {
  background: #39A8DB;
  border-color: #39A8DB;
  color: #fff;
}

.dc-tool__chip:active {
  transform: scale(0.97);
}

.dc-tool__chip:focus-visible,
.dc-tool__btn:focus-visible,
.dc-tool-seo__faq-item summary:focus-visible {
  outline: 3px solid #2aa7df;
  outline-offset: 2px;
}

/* Botões — inspirados em dc-action-btn, adaptados para fundo claro */
.dc-tool__btn {
  --dc-ease: cubic-bezier(0.23, 1, 0.32, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  background: transparent;
  transition: transform 0.16s var(--dc-ease), box-shadow 0.2s, background 0.2s, border-color 0.2s;
  width: 100%;
  margin-bottom: 0.5rem;
}

.dc-tool__btn:active {
  transform: scale(0.97);
}

.dc-tool__btn:focus-visible {
  outline: 3px solid rgba(57, 168, 219, 0.5);
  outline-offset: 2px;
}

.dc-tool__btn--primary {
  background: #39A8DB;
  color: #fff;
  box-shadow: 0 6px 18px rgba(57, 168, 219, 0.35);
  margin-bottom: 1rem;
}

.dc-tool__btn--primary:hover:not(:disabled) {
  background: #2d8dba;
  box-shadow: 0 8px 22px rgba(57, 168, 219, 0.45);
  transform: translateY(-1px);
}

.dc-tool__btn--secondary {
  background: #fff;
  border-color: #39A8DB;
  color: #2d8dba;
}

.dc-tool__btn--secondary:hover:not(:disabled) {
  background: #eef8fd;
}

.dc-tool__btn--ghost {
  background: transparent;
  border-color: #c5deee;
  color: #48657a;
}

.dc-tool__btn--ghost:hover:not(:disabled) {
  background: #f4f9fc;
  border-color: #39A8DB;
  color: #2d8dba;
}

.dc-tool__btn:disabled,
.dc-tool__btn.is-loading {
  opacity: 0.65;
  cursor: wait;
  pointer-events: none;
}

.dc-tool__btn.is-loading .dc-tool__btn-text {
  opacity: 0;
}

.dc-tool__btn.is-loading .dc-tool__spinner {
  display: block;
}

.dc-tool__spinner {
  display: none;
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: dc-spin 0.7s linear infinite;
}

.dc-tool__btn--primary {
  position: relative;
}

@keyframes dc-spin {
  to { transform: rotate(360deg); }
}

.dc-tool__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
}

.dc-tool__actions .dc-tool__btn {
  margin-bottom: 0;
  min-height: 44px;
  font-size: 0.8125rem;
  padding: 0.75rem 0.85rem;
}

.dc-tool__actions .dc-tool__btn i {
  font-size: 0.9375rem;
  flex-shrink: 0;
}

.dc-tool__field-hint {
  font-size: 0.75rem;
  color: #5d7889;
  margin: 0.375rem 0 0;
  line-height: 1.35;
}

.dc-tool__hint {
  font-size: 0.8125rem;
  color: #48657a;
  margin: 0.5rem 0 0;
  min-height: 1.25rem;
}

.dc-tool__hint.is-error {
  color: #dc2626;
}

.dc-tool__hint.is-success {
  color: #15803d;
  font-weight: 600;
}

/* Output / grade */
.dc-wordsearch__empty {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  text-align: center;
  color: #48657a;
  font-size: 0.9375rem;
  padding: 1.5rem 1rem;
  border: 2px dashed #d4e8f4;
  border-radius: 14px;
  background: #fafdff;
}

.dc-wordsearch__empty-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(57, 168, 219, 0.12);
  color: #39A8DB;
  font-size: 1.35rem;
  margin-bottom: 0.875rem;
}

.dc-wordsearch__empty-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #2d8dba;
  margin: 0 0 0.5rem;
}

.dc-wordsearch__empty-text {
  margin: 0;
  max-width: 28rem;
  line-height: 1.55;
}

.dc-wordsearch__sheet[hidden],
.dc-wordsearch__empty[hidden] {
  display: none !important;
}

.dc-wordsearch__sheet {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  min-height: auto;
  border: 1px solid #e2ebf2;
  border-radius: 14px;
  padding: 1rem;
  background: #fff;
  overflow: visible;
  position: static;
}

.dc-tool.has-result .dc-wordsearch__sheet,
.dc-tool__output.has-content .dc-wordsearch__sheet {
  flex: none;
  min-height: auto;
  height: auto;
  max-height: none;
}

.dc-wordsearch__header {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e8f2f8;
}

.dc-wordsearch__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2d8dba;
  margin: 0 0 0.25rem;
}

.dc-wordsearch__subtitle {
  font-size: 0.8125rem;
  color: #48657a;
  margin: 0;
}

.dc-wordsearch__body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  flex-shrink: 0;
}

.dc-wordsearch__grid-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  justify-content: center;
  padding: 0.5rem;
  background: #f8fcff;
  border: 1px solid #e2ebf2;
  border-radius: 12px;
}

.dc-wordsearch__wordlist {
  width: 100%;
  flex-shrink: 0;
  padding: 0.875rem 1rem;
  background: #f4f9fc;
  border: 1px solid #e2ebf2;
  border-radius: 12px;
}

.dc-wordsearch__wordlist-title {
  margin: 0 0 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2d8dba;
  text-align: center;
}

.dc-wordsearch__grid {
  --dc-cell: clamp(14px, calc((100vw - 4.5rem) / var(--dc-ws-cols, 12)), 28px);
  display: grid;
  gap: 2px;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  font-size: calc(var(--dc-cell) * 0.55);
  line-height: 1;
  user-select: none;
}

.dc-wordsearch__cell {
  width: var(--dc-cell);
  height: var(--dc-cell);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c5deee;
  border-radius: 4px;
  background: #fff;
  color: #1a2b3c;
}

.dc-wordsearch__cell.is-solution {
  background: rgba(57, 168, 219, 0.25);
  border-color: #39A8DB;
  color: #1a5f7a;
}

.dc-wordsearch__words {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  max-width: 100%;
}

.dc-wordsearch__words li {
  font-size: 0.875rem;
  font-weight: 600;
  color: #2d8dba;
  letter-spacing: 0.06em;
}

.dc-wordsearch__footer {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #6c8494;
}

.dc-wordsearch__footer--print {
  display: none;
}

/* Mobile: grade + lista sempre visíveis; sem slot de anúncio vazio */
@media (max-width: 767.98px) {
  .dc-tool__output {
    min-height: auto;
    overflow: visible;
  }

  .dc-wordsearch__sheet {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
  }

  .dc-wordsearch__body {
    align-items: stretch;
    width: 100%;
  }

  .dc-wordsearch__grid-wrap,
  .dc-wordsearch__wordlist {
    flex-shrink: 0;
  }

  .dc-tools-page .content > .ads,
  .dc-tools-page .content .ads:has(#banner-970x250-area) {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
}

/* Desktop: 2 colunas — alturas iguais só no estado vazio; com resultado, fluxo natural */
@media (min-width: 768px) {
  .dc-tool__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .dc-tool:not(.has-result) .dc-tool__layout {
    align-items: stretch;
  }

  .dc-tool__controls,
  .dc-tool__output {
    min-width: 0;
    width: 100%;
  }

  .dc-tool:not(.has-result) .dc-tool__controls,
  .dc-tool:not(.has-result) .dc-tool__output {
    flex: 1 1 auto;
  }

  .dc-tool.has-result .dc-tool__layout {
    align-items: start;
  }

  .dc-tool.has-result .dc-tool__controls,
  .dc-tool.has-result .dc-tool__output {
    flex: none;
    height: auto;
    min-height: auto;
    max-height: none;
    align-self: start;
  }

  .dc-tool__controls {
    position: sticky;
    top: 1rem;
    align-self: start;
  }

  .dc-tool:not(.has-result) .dc-wordsearch__empty {
    flex: 1 1 auto;
    min-height: 260px;
  }

  .dc-tool.has-result {
    margin-bottom: 3rem;
  }

  .dc-tools-page .content .dc-tool-page-banner,
  .dc-tools-page .content .ads:has(#banner-970x250-area) {
    clear: both;
    margin-top: 3rem;
    position: relative;
    z-index: 0;
  }

  .dc-tool__actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dc-wordsearch__body {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .dc-wordsearch__grid-wrap {
    flex: unset;
    min-width: 0;
    max-width: 100%;
  }

  .dc-wordsearch__wordlist {
    flex: unset;
    width: 100%;
    max-width: none;
  }

  .dc-wordsearch__grid {
    --dc-cell: clamp(14px, calc((100vw - 5rem) / var(--dc-ws-cols, 12)), 24px);
    max-width: 100%;
    margin: 0 auto;
  }
}

/* SEO block — card branco sobre fundo azul do tema */
.dc-tool-seo {
  font-family: Inter, system-ui, sans-serif;
  margin-top: 2.5rem;
  padding: 2rem;
  background: #fff;
  border: 1px solid #e2ebf2;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(57, 168, 219, 0.08);
  color: #1a1a1a;
}

.dc-tool-seo__intro p {
  font-size: 1rem;
  line-height: 1.65;
  color: #3d5166;
  margin-bottom: 1rem;
}

.dc-tool-seo__heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 1.75rem 0 1rem;
}

.dc-tool-seo__heading:first-of-type {
  margin-top: 0;
}

.dc-tool-seo__steps {
  padding-left: 1.25rem;
  line-height: 1.7;
  color: #3d5166;
}

.dc-tool-seo__steps li {
  margin-bottom: 0.35rem;
}

.dc-tool-seo__faq-item {
  background: #f8fcff;
  border: 1px solid #c5deee;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.dc-tool-seo__faq-item summary {
  padding: 0.875rem 1rem 0.875rem 2.25rem;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
  list-style: none;
  position: relative;
  background: #fff;
  transition: background 0.15s;
}

.dc-tool-seo__faq-item summary:hover {
  background: #eef8fd;
}

.dc-tool-seo__faq-item summary::before {
  content: '+';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.125rem;
  font-weight: 700;
  color: #2d8dba;
  line-height: 1;
}

.dc-tool-seo__faq-item[open] summary::before {
  content: '−';
}

.dc-tool-seo__faq-item[open] summary {
  border-bottom: 1px solid #e2ebf2;
}

.dc-tool-seo__faq-item summary::-webkit-details-marker {
  display: none;
}

.dc-tool-seo__faq-item p {
  padding: 0.875rem 1rem 1rem;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #3d5166;
  background: #fff;
}

/* Print — padrão compartilhado (caça-palavras + matemática); style.css esconde * no print */
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  body.dc-tool-printing {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Anúncios e chrome do site — display + visibility para vencer reparenting do GPT/UOL */
  body.dc-tool-printing .d-print-none,
  body.dc-tool-printing .dc-tool__controls,
  body.dc-tool-printing .dc-tool__actions,
  body.dc-tool-printing .dc-tool-seo,
  body.dc-tool-printing .dc-wordsearch__empty,
  body.dc-tool-printing .dc-math__empty,
  body.dc-tool-printing .dc-crossword__empty,
  body.dc-tool-printing .dc-maze__empty,
  body.dc-tool-printing .dc-dots__empty,
  body.dc-tool-printing .dc-tracing__empty,
  body.dc-tool-printing .dc-wordsearch__subtitle,
  body.dc-tool-printing .dc-math__subtitle,
  body.dc-tool-printing .dc-crossword__subtitle,
  body.dc-tool-printing .dc-maze__subtitle,
  body.dc-tool-printing .dc-dots__subtitle,
  body.dc-tool-printing .dc-tracing__subtitle,
  body.dc-tool-printing .ads,
  body.dc-tool-printing .adfixed,
  body.dc-tool-printing header,
  body.dc-tool-printing footer:not(.dc-wordsearch__footer):not(.dc-math__footer):not(.dc-crossword__footer):not(.dc-maze__footer):not(.dc-dots__footer):not(.dc-tracing__footer),
  body.dc-tool-printing .navbar,
  body.dc-tool-printing .chamada-categoria,
  body.dc-tool-printing .dc-footer,
  body.dc-tool-printing .dc-skip-link,
  body.dc-tool-printing #banner-970x250-area,
  body.dc-tool-printing #banner-970x250-area-2,
  body.dc-tool-printing #banner-320x50-area,
  body.dc-tool-printing [id*="banner"],
  body.dc-tool-printing [id^="google_ads"],
  body.dc-tool-printing [id*="Google_ads"],
  body.dc-tool-printing ins.adsbygoogle,
  body.dc-tool-printing iframe[src*="googlesyndication"],
  body.dc-tool-printing iframe[src*="doubleclick"],
  body.dc-tool-printing iframe[src*="viralize"],
  body.dc-tool-printing .dc-tool-print-ad-hidden {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Chrome da página — não esconder .row que envolve .dc-tool (filho indireto) */
  body.dc-tools-page.dc-tool-printing .content > .row:has(.chamada-categoria),
  body.dc-tools-page.dc-tool-printing .dc-tool-seo,
  body.dc-tools-page.dc-tool-printing .dc-tool-page-banner,
  body.dc-tools-page.dc-tool-printing .content > .ads {
    display: none !important;
    visibility: hidden !important;
  }

  body.dc-tool-printing .content .row:has(.dc-tool),
  body.dc-tool-printing .content .row:has(.dc-tool) .col-md-12,
  body.dc-tool-printing .dc-tool,
  body.dc-tool-printing .dc-tool__layout,
  body.dc-tool-printing .dc-tool__output,
  body.dc-tool-printing .dc-tool__panel.dc-tool__output {
    display: block !important;
    visibility: visible !important;
  }

  body.dc-tool-printing .dc-tool {
    position: static;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-shadow: none;
    background: #fff;
  }

  body.dc-tool-printing .dc-tool__layout,
  body.dc-tool-printing .dc-tool__output,
  body.dc-tool-printing .dc-tool__panel {
    display: block;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    background: none;
    min-height: 0;
  }

  body.dc-tool-printing .dc-wordsearch__header,
  body.dc-tool-printing .dc-math__header,
  body.dc-tool-printing .dc-crossword__header,
  body.dc-tool-printing .dc-maze__header,
  body.dc-tool-printing .dc-dots__header,
  body.dc-tool-printing .dc-tracing__header {
    flex: 0 0 auto;
    margin: 0 0 5mm;
    padding: 0 0 4mm;
    border-bottom: 0.75pt solid #333;
    text-align: center;
  }

  body.dc-tool-printing .dc-wordsearch__title,
  body.dc-tool-printing .dc-math__title,
  body.dc-tool-printing .dc-crossword__title,
  body.dc-tool-printing .dc-maze__title,
  body.dc-tool-printing .dc-dots__title,
  body.dc-tool-printing .dc-tracing__title {
    font-size: 18pt;
    font-weight: 800;
    line-height: 1.25;
    color: #000 !important;
    margin: 0;
    text-transform: none;
    letter-spacing: 0.01em;
  }

  body.dc-tool-printing .dc-wordsearch__footer--print,
  body.dc-tool-printing .dc-math__footer--print,
  body.dc-tool-printing .dc-crossword__footer--print,
  body.dc-tool-printing .dc-maze__footer--print,
  body.dc-tool-printing .dc-dots__footer--print,
  body.dc-tool-printing .dc-tracing__footer--print {
    display: block !important;
    flex: 0 0 auto;
    margin-top: auto;
    padding-top: 4mm;
    font-size: 7pt;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: #aaa !important;
    text-align: center;
  }

  /* --- Caça-palavras --- */
  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__sheet,
  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__sheet * {
    visibility: visible !important;
  }

  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__sheet[hidden] {
    display: flex !important;
  }

  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__sheet {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    box-sizing: border-box;
    width: 100%;
    min-height: calc(100vh - 24mm);
    max-height: calc(100vh - 24mm);
    page-break-inside: avoid;
    break-inside: avoid;
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
    gap: 0;
  }

  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 6mm;
    min-height: 0;
    width: 100%;
  }

  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__grid-wrap {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: #fff;
    overflow: visible;
    min-height: 0;
  }

  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__grid {
    --dc-cell: var(--dc-ws-print-cell, 8mm);
    gap: 0.5mm;
    margin: 0 auto;
    width: max-content;
    max-width: 100%;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    font-size: calc(var(--dc-cell) * 0.56);
    line-height: 1;
  }

  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__cell {
    width: var(--dc-cell);
    height: var(--dc-cell);
    border: 0.75pt solid #000;
    border-radius: 0;
    background: #fff;
    color: #000;
    box-sizing: border-box;
  }

  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__cell.is-solution {
    background: transparent !important;
    border-color: #000;
    color: #000;
  }

  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__wordlist {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    padding: 4mm 5mm;
    margin: 0;
    border: 0.75pt solid #ccc;
    border-radius: 0;
    background: #fff;
    box-sizing: border-box;
  }

  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__wordlist-title {
    margin: 0 0 3mm;
    padding: 0 0 2mm;
    font-size: 0;
    line-height: 0;
    text-align: center;
    border-bottom: 0.5pt solid #999;
  }

  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__wordlist-title::after {
    content: "Encontre as palavras";
    display: block;
    font-size: 8pt;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #555 !important;
  }

  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__words {
    display: grid;
    grid-template-columns: repeat(var(--dc-ws-word-cols, 3), minmax(0, 1fr));
    gap: 2mm 4mm;
    justify-items: center;
    align-items: start;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    list-style: none;
  }

  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__words li {
    font-size: 11pt;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #000 !important;
    break-inside: avoid;
    page-break-inside: avoid;
    text-align: center;
  }

  /* --- Matemática — layout adaptativo via CSS vars (JS) --- */
  body.dc-tool-printing.dc-math-printing .dc-math__sheet,
  body.dc-tool-printing.dc-math-printing .dc-math__sheet * {
    visibility: visible !important;
  }

  body.dc-tool-printing.dc-math-printing .dc-math__sheet[hidden] {
    display: block !important;
  }

  body.dc-tool-printing.dc-math-printing .dc-math__sheet {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: auto;
    max-height: none;
    page-break-inside: auto;
    break-inside: auto;
    border: none;
    padding: 0;
    margin: 0;
  }

  body.dc-tool-printing.dc-math-printing .dc-math__footer--print {
    margin-top: 4mm;
    padding-top: 0;
    padding-bottom: 2mm;
  }

  body.dc-tool-printing.dc-math-printing .dc-math__problems {
    display: grid;
    grid-template-columns: repeat(var(--dc-math-print-cols, 2), minmax(0, 1fr));
    grid-auto-flow: row;
    gap: var(--dc-math-print-row-gap, 5mm) var(--dc-math-print-col-gap, 6mm);
    align-content: start;
  }

  body.dc-tool-printing.dc-math-printing .dc-math__problem {
    display: flex;
    align-items: flex-start;
    gap: 3mm;
    min-height: calc(var(--dc-math-print-answer-h, 44mm) + 12mm);
    background: #fff;
    border: none;
    border-radius: 0;
    padding: 2mm 0 3mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.dc-tool-printing.dc-math-printing .dc-math__problem.dc-math__problem--page-break {
    break-after: page;
    page-break-after: always;
  }

  body.dc-tool-printing.dc-math-printing .dc-math__problem-badge {
    flex: 0 0 auto;
    width: 6mm;
    height: 6mm;
    margin-top: 0.5mm;
    font-size: 7pt;
    font-weight: 800;
    color: #333 !important;
    background: #eee !important;
    border: 0.5pt solid #666 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.dc-tool-printing.dc-math-printing .dc-math__problem-body {
    flex: 1 1 auto;
    gap: 2mm;
    min-width: 0;
  }

  body.dc-tool-printing.dc-math-printing .dc-math__expr {
    font-size: 12pt;
    color: #000 !important;
  }

  body.dc-tool-printing.dc-math-printing .dc-math__answer {
    min-height: var(--dc-math-print-answer-h, 44mm);
    height: var(--dc-math-print-answer-h, 44mm);
    border: 0.75pt solid #666;
    border-radius: 1.5mm;
    background: #fff !important;
  }

  /* --- Labirinto --- */
  body.dc-tool-printing.dc-maze-printing .dc-maze__sheet,
  body.dc-tool-printing.dc-maze-printing .dc-maze__sheet * {
    visibility: visible !important;
  }

  body.dc-tool-printing.dc-maze-printing .dc-maze__sheet[hidden] {
    display: block !important;
  }

  body.dc-tool-printing.dc-maze-printing .dc-maze__sheet {
    display: block;
    box-sizing: border-box;
    width: 100%;
    page-break-inside: avoid;
    border: none;
    border-radius: 0;
    padding: 0;
    background: #fff;
  }

  body.dc-tool-printing.dc-maze-printing .dc-maze__board {
    margin: 0 auto;
    max-width: 100%;
  }

  body.dc-tool-printing.dc-maze-printing .dc-maze__bg,
  body.dc-tool-printing.dc-maze-printing .dc-maze__shape-fill rect {
    fill: #fff !important;
  }

  body.dc-tool-printing.dc-maze-printing .dc-maze__walls {
    stroke: #111 !important;
  }

  body.dc-tool-printing.dc-maze-printing .dc-maze__solution {
    stroke: #d4700f !important;
  }

  /* --- Ligar os pontos --- */
  body.dc-tool-printing.dc-dots-printing .dc-dots__sheet,
  body.dc-tool-printing.dc-dots-printing .dc-dots__sheet * {
    visibility: visible !important;
  }

  body.dc-tool-printing.dc-dots-printing .dc-dots__sheet[hidden] {
    display: block !important;
  }

  body.dc-tool-printing.dc-dots-printing .dc-dots__sheet {
    display: block;
    box-sizing: border-box;
    width: 100%;
    page-break-inside: avoid;
    border: none;
    border-radius: 0;
    padding: 0;
    background: #fff;
  }

  body.dc-tool-printing.dc-dots-printing .dc-dots__canvas-wrap {
    display: flex;
    justify-content: center;
    margin: 0 auto;
  }

  body.dc-tool-printing.dc-dots-printing .dc-dots__canvas {
    max-width: 170mm;
    max-height: 170mm;
    width: auto !important;
    height: auto !important;
  }

  /* --- Caligrafia / nome pontilhado --- */
  body.dc-tool-printing.dc-tracing-printing .dc-tracing__sheet,
  body.dc-tool-printing.dc-tracing-printing .dc-tracing__sheet * {
    visibility: visible !important;
  }

  body.dc-tool-printing.dc-tracing-printing .dc-tracing__sheet[hidden] {
    display: block !important;
  }

  body.dc-tool-printing.dc-tracing-printing .dc-tracing__sheet {
    display: block;
    box-sizing: border-box;
    width: 100%;
    page-break-inside: avoid;
    border: none;
    border-radius: 0;
    padding: 0;
    background: #fff;
  }

  body.dc-tool-printing.dc-tracing-printing .dc-tracing__canvas-wrap {
    display: block;
    width: 100%;
  }

  body.dc-tool-printing.dc-tracing-printing .dc-tracing__canvas {
    width: 100% !important;
    height: auto !important;
  }

}

@media print and (orientation: landscape) {
  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__sheet {
    min-height: calc(100vh - 24mm);
    max-height: calc(100vh - 24mm);
  }

  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__body {
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 6mm;
  }

  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__grid-wrap {
    flex: 1 1 58%;
    max-width: 58%;
  }

  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__wordlist {
    flex: 1 1 38%;
    max-width: 38%;
    border: 0.75pt solid #ccc;
    padding: 4mm;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  body.dc-tool-printing.dc-ws-printing .dc-wordsearch__words {
    grid-template-columns: repeat(var(--dc-ws-word-cols, 2), minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .dc-tool__btn,
  .dc-tool__chip {
    transition: background 0.2s, border-color 0.2s, color 0.2s;
  }

  .dc-tool__btn:hover,
  .dc-tool__btn:active {
    transform: none;
  }

  .dc-tool__spinner {
    animation: none;
    border-top-color: transparent;
  }
}

/* ------------------------------------------------------------------
   Contraste (somente .content): style.css carrega depois (header.php).
   Não afeta header, .navbar nem .dc-mainmenu — cores do menu em style.css.
   ------------------------------------------------------------------ */
.content .dc-tool,
.content .dc-tool-seo {
  color: #1a1a1a;
}

.content .dc-tool .dc-tool__label {
  color: #1a5f7a !important;
}

.content .dc-tool .dc-tool__hint {
  color: #48657a !important;
}

.content .dc-tool .dc-tool__hint.is-error {
  color: #dc2626 !important;
}

.content .dc-tool .dc-tool__hint.is-success {
  color: #15803d !important;
}

.content .dc-tool .dc-wordsearch__empty,
.content .dc-tool .dc-wordsearch__empty-text {
  color: #3d5166 !important;
}

.content .dc-tool .dc-wordsearch__empty-title {
  color: #1a1a1a !important;
}

.content .dc-tool .dc-wordsearch__title {
  color: #1a1a1a !important;
  text-transform: none;
}

.content .dc-tool .dc-wordsearch__subtitle {
  color: #48657a !important;
}

.content .dc-tool .dc-wordsearch__wordlist-title {
  color: #1a5f7a !important;
}

body.dc-tool-printing .content .dc-wordsearch__wordlist-title::after {
  color: #555 !important;
}

body.dc-tool-printing .content .dc-wordsearch__words li {
  color: #000 !important;
}

body.dc-tool-printing .content .dc-wordsearch__footer--print,
body.dc-tool-printing .content .dc-math__footer--print,
body.dc-tool-printing .content .dc-crossword__footer--print,
body.dc-tool-printing .content .dc-maze__footer--print,
body.dc-tool-printing .content .dc-dots__footer--print,
body.dc-tool-printing .content .dc-tracing__footer--print {
  color: #aaa !important;
}

.content .dc-tool .dc-wordsearch__words li {
  color: #1a5f7a !important;
}

.content .dc-tool .dc-wordsearch__footer {
  color: #48657a !important;
}

.content .dc-tool-seo p {
  color: #3d5166 !important;
}

.content .dc-tool-seo h2.dc-tool-seo__heading {
  color: #1a1a1a !important;
  text-transform: none;
}

.content .dc-tool-seo ol.dc-tool-seo__steps,
.content .dc-tool-seo ol.dc-tool-seo__steps li {
  color: #3d5166 !important;
}

.content .dc-tool-seo .dc-tool-seo__faq-item summary {
  color: #1a1a1a !important;
}

.content .dc-tool-seo .dc-tool-seo__faq-item p {
  color: #3d5166 !important;
}

.content .dc-tool .dc-tool__chip {
  color: #1a5f7a !important;
}

.content .dc-tool .dc-tool__chip:hover,
.content .dc-tool .dc-tool__chip.is-active {
  color: #fff !important;
}

.content .dc-tool .dc-tool__btn--primary,
.content .dc-tool .dc-tool__btn--primary span {
  color: #fff !important;
}

.content .dc-tool .dc-tool__btn--secondary {
  color: #1a5f7a !important;
}

.content .dc-tool .dc-tool__btn--ghost {
  color: #3d5166 !important;
}

/* Espaço entre ferramenta e banner 970×250 (antes do bloco SEO) */
.content .ads:has(#banner-970x250-area) {
  margin-top: 2.5rem;
}

/* Respiro antes do footer — só páginas de ferramenta (body.dc-tools-page) */
.dc-tools-page .content {
  padding-bottom: 2.5rem;
}

/* ------------------------------------------------------------------
   Atividades de Matemática
   ------------------------------------------------------------------ */
.dc-math__cap-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #2d8dba;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.dc-math__cap-check {
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: #39A8DB;
}

.dc-math__cap-input {
  margin-top: 0.25rem;
}

.dc-math__empty {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  text-align: center;
  color: #48657a;
  font-size: 0.9375rem;
  padding: 1.5rem 1rem;
  border: 2px dashed #d4e8f4;
  border-radius: 14px;
  background: #fafdff;
}

.dc-math__empty-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(57, 168, 219, 0.12);
  color: #39A8DB;
  font-size: 1.35rem;
  margin-bottom: 0.875rem;
}

.dc-math__empty-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #2d8dba;
  margin: 0 0 0.5rem;
}

.dc-math__empty-text {
  margin: 0;
  max-width: 28rem;
  line-height: 1.55;
}

.dc-math__sheet[hidden],
.dc-math__empty[hidden] {
  display: none !important;
}

.dc-math__sheet {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2ebf2;
  border-radius: 14px;
  padding: 1rem;
  background: #fff;
}

.dc-math__header {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e8f2f8;
}

.dc-math__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2d8dba;
  margin: 0 0 0.25rem;
}

.dc-math__subtitle {
  font-size: 0.8125rem;
  color: #48657a;
  margin: 0;
}

.dc-math__problems {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-flow: row;
  gap: 1rem 1.5rem;
}

.dc-math__problem {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 12rem;
  padding: 0.875rem 1rem;
  background: #f8fcff;
  border: 1px solid #e2ebf2;
  border-radius: 10px;
}

.dc-math__problem-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.125rem;
  border-radius: 50%;
  background: rgba(57, 168, 219, 0.14);
  border: 1.5px solid #39A8DB;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1;
  color: #2d8dba;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.dc-math__problem-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
}

.dc-math__expr {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a2b3c;
  letter-spacing: 0.02em;
  white-space: pre;
}

.dc-math__answer {
  display: block;
  width: 100%;
  min-height: 10rem;
  border: 1.5px solid #c5d9e8;
  border-radius: 8px;
  background: #fff;
}

.dc-math__footer {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #6c8494;
}

.dc-math__footer--print {
  display: none;
}

@media (min-width: 768px) {
  .dc-math__problems {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
  }

  .dc-tool:not(.has-result) .dc-math__empty {
    flex: 1 1 auto;
    min-height: 260px;
  }

  .dc-tool__actions:has(#dc-math-new) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Contraste — matemática */
.content .dc-tool .dc-math__empty,
.content .dc-tool .dc-math__empty-text {
  color: #3d5166 !important;
}

.content .dc-tool .dc-math__empty-title {
  color: #1a1a1a !important;
}

.content .dc-tool .dc-math__title {
  color: #1a1a1a !important;
  text-transform: none;
}

.content .dc-tool .dc-math__subtitle {
  color: #48657a !important;
}

.content .dc-tool .dc-math__expr {
  color: #1a2b3c !important;
}

.content .dc-tool .dc-math__footer {
  color: #48657a !important;
}

.content .dc-tool .dc-math__cap-label {
  color: #1a5f7a !important;
}

/* ------------------------------------------------------------------
   Palavras Cruzadas
   ------------------------------------------------------------------ */
.dc-crossword__empty {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  text-align: center;
  color: #48657a;
  font-size: 0.9375rem;
  padding: 1.5rem 1rem;
  border: 2px dashed #d4e8f4;
  border-radius: 14px;
  background: #fafdff;
}

.dc-crossword__empty-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(57, 168, 219, 0.12);
  color: #39A8DB;
  font-size: 1.35rem;
  margin-bottom: 0.875rem;
}

.dc-crossword__empty-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #2d8dba;
  margin: 0 0 0.5rem;
}

.dc-crossword__empty-text {
  margin: 0;
  max-width: 28rem;
  line-height: 1.55;
}

.dc-crossword__sheet[hidden],
.dc-crossword__empty[hidden] {
  display: none !important;
}

.dc-crossword__sheet {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2ebf2;
  border-radius: 14px;
  padding: 1rem;
  background: #fff;
}

.dc-crossword__header {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e8f2f8;
}

.dc-crossword__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #2d8dba;
  margin: 0 0 0.25rem;
}

.dc-crossword__subtitle {
  font-size: 0.8125rem;
  color: #48657a;
  margin: 0;
}

.dc-crossword__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dc-crossword__grid-wrap {
  overflow-x: auto;
  display: flex;
  justify-content: center;
}

.dc-crossword__grid {
  --dc-xw-cell: clamp(1.5rem, 4vw, 2rem);
  display: grid;
  gap: 1px;
  background: #b8c4ce;
  border: 1px solid #6c8494;
}

.dc-crossword__cell {
  position: relative;
  width: var(--dc-xw-cell);
  height: var(--dc-xw-cell);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: clamp(0.75rem, 2.5vw, 1rem);
}

.dc-crossword__cell.is-blocked {
  background: #e8eef2;
}

.dc-crossword__cell.is-filled {
  color: #1a2b3c;
}

.dc-crossword__number {
  position: absolute;
  top: 1px;
  left: 2px;
  z-index: 2;
  font-size: 0.55rem;
  font-weight: 700;
  line-height: 1;
  color: #333;
  pointer-events: none;
  user-select: none;
}

.dc-crossword__letter {
  position: relative;
  z-index: 1;
  font: inherit;
  font-weight: 700;
  text-transform: uppercase;
}

.dc-crossword__input {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  text-align: center;
  font: inherit;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0;
  color: #1a2b3c;
}

.dc-crossword__input:focus {
  outline: 2px solid #39A8DB;
  outline-offset: -2px;
  background: #f0f9ff;
}

.dc-crossword__cell.is-correct input {
  background: #dcfce7;
  box-shadow: inset 0 0 0 2px #22c55e;
}

.dc-crossword__cell.is-correct input:focus {
  background: #dcfce7;
  outline-color: #22c55e;
}

.dc-crossword__cell.is-wrong input {
  background: #fee2e2;
  box-shadow: inset 0 0 0 2px #ef4444;
}

.dc-crossword__cell.is-wrong input:focus {
  background: #fee2e2;
  outline-color: #ef4444;
}

.dc-crossword__cell.is-active-word {
  background: #fff8e1;
}

.dc-crossword__cell.is-active-word .dc-crossword__input:focus {
  background: #f0f9ff;
}

.dc-crossword__clue-list li.is-active {
  background: #fff8e1;
  border-radius: 4px;
  padding: 0.15rem 0.35rem;
  margin-left: -0.35rem;
  color: #1a2b3c;
}

.dc-crossword__clue-item {
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.dc-crossword__clue-item:hover,
.dc-crossword__clue-item:focus {
  background: #f0f9ff;
}

.dc-crossword__clue-item:focus-visible {
  outline: 3px solid #2aa7df;
  outline-offset: 2px;
}

.dc-crossword__clues {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}

@media (max-width: 480px) {
  .dc-crossword__clues {
    grid-template-columns: 1fr;
  }
}

.dc-crossword__clue-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #2d8dba;
  margin: 0 0 0.5rem;
}

.dc-crossword__clue-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #3d5166;
}

.dc-crossword__clue-list li {
  margin-bottom: 0.35rem;
}

.dc-crossword__clue-num {
  font-weight: 700;
  color: #333;
}

.dc-crossword__footer {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #6c8494;
}

.dc-crossword__footer--print {
  display: none;
}

/* Export/PDF — html2canvas não aplica @media print; mesmas regras leves na tela */
body.dc-tool-printing.dc-xw-printing .dc-crossword__sheet,
body.dc-tool-printing.dc-xw-printing .dc-crossword__sheet * {
  visibility: visible !important;
}

body.dc-tool-printing.dc-xw-printing .dc-crossword__sheet[hidden] {
  display: block !important;
}

body.dc-tool-printing.dc-xw-printing .dc-crossword__sheet {
  display: block;
  box-sizing: border-box;
  width: 100%;
  border: none;
  border-radius: 0;
  padding: 0;
  background: #fff;
}

body.dc-tool-printing.dc-xw-printing .dc-crossword__body {
  display: flex;
  flex-direction: column;
  gap: 4mm;
}

body.dc-tool-printing.dc-xw-printing .dc-crossword__grid {
  --dc-xw-cell: var(--dc-xw-print-cell, 7mm);
  gap: 0;
  margin: 0 auto;
  background: #fff !important;
  border: 0.75pt solid #666;
}

body.dc-tool-printing.dc-xw-printing .dc-crossword__cell {
  min-width: var(--dc-xw-cell);
  min-height: var(--dc-xw-cell);
  border: 0.75pt solid #666;
  background: #fff !important;
  font-size: 9pt;
}

body.dc-tool-printing.dc-xw-printing .dc-crossword__cell.is-blocked {
  background: #f5f5f5 !important;
  border-color: #ccc;
}

body.dc-tool-printing.dc-xw-printing .dc-crossword__number {
  font-size: 5pt;
  color: #000 !important;
  z-index: 2;
}

body.dc-tool-printing.dc-xw-printing .dc-crossword__clues {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3mm 5mm;
  font-size: 8pt;
  color: #000 !important;
}

body.dc-tool-printing.dc-xw-printing .dc-crossword__clue-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

body.dc-tool-printing.dc-xw-printing .dc-crossword__clue-num {
  font-weight: 700;
  color: #000 !important;
}

body.dc-tool-printing.dc-xw-printing .dc-crossword__footer--print {
  display: block;
  text-align: center;
  margin-top: 4mm;
  font-size: 7pt;
  color: #666 !important;
}

/* Export/PDF matemática — html2canvas não aplica @media print; mesmas regras na tela */
body.dc-tool-printing.dc-math-printing .dc-math__sheet {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: auto;
  max-height: none;
  border: none;
  padding: 0;
  margin: 0;
  background: #fff;
}

body.dc-tool-printing.dc-math-printing .dc-math__problems {
  display: grid;
  grid-template-columns: repeat(var(--dc-math-print-cols, 2), minmax(0, 1fr));
  grid-auto-flow: row;
  gap: var(--dc-math-print-row-gap, 5mm) var(--dc-math-print-col-gap, 6mm);
  align-content: start;
}

body.dc-tool-printing.dc-math-printing .dc-math__problem {
  display: flex;
  align-items: flex-start;
  gap: 3mm;
  min-height: calc(var(--dc-math-print-answer-h, 44mm) + 12mm);
  background: #fff;
  border: none;
  border-radius: 0;
  padding: 2mm 0 3mm;
}

body.dc-tool-printing.dc-math-printing .dc-math__problem-badge {
  flex: 0 0 auto;
  width: 6mm;
  height: 6mm;
  margin-top: 0.5mm;
  font-size: 7pt;
  font-weight: 800;
  color: #333 !important;
  background: #eee !important;
  border: 0.5pt solid #666 !important;
}

body.dc-tool-printing.dc-math-printing .dc-math__problem-body {
  flex: 1 1 auto;
  gap: 2mm;
  min-width: 0;
}

body.dc-tool-printing.dc-math-printing .dc-math__expr {
  font-size: 12pt;
  color: #000 !important;
}

body.dc-tool-printing.dc-math-printing .dc-math__answer {
  min-height: var(--dc-math-print-answer-h, 44mm);
  height: var(--dc-math-print-answer-h, 44mm);
  border: 0.75pt solid #666;
  border-radius: 1.5mm;
  background: #fff !important;
}

body.dc-tool-printing.dc-math-printing .dc-math__footer--print {
  display: block;
  text-align: center;
  margin-top: 4mm;
  font-size: 7pt;
  color: #666 !important;
}

/* ------------------------------------------------------------------
   Labirinto
   ------------------------------------------------------------------ */
.dc-maze__empty {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  text-align: center;
  color: #48657a;
  font-size: 0.9375rem;
  padding: 1.5rem 1rem;
  border: 2px dashed #d4e8f4;
  border-radius: 14px;
  background: #fafdff;
}

.dc-maze__empty-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(57, 168, 219, 0.12);
  color: #39A8DB;
  font-size: 1.35rem;
  margin-bottom: 0.875rem;
}

.dc-maze__empty-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #2d8dba;
  margin: 0 0 0.5rem;
}

.dc-maze__empty-text {
  margin: 0;
  max-width: 28rem;
  line-height: 1.55;
}

.dc-maze__sheet[hidden],
.dc-maze__empty[hidden] {
  display: none !important;
}

.dc-maze__sheet {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2ebf2;
  border-radius: 14px;
  padding: 1rem;
  background: #fff;
}

.dc-maze__header {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e8f2f8;
}

.dc-maze__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #2d8dba;
  margin: 0 0 0.25rem;
}

.dc-maze__subtitle {
  font-size: 0.8125rem;
  color: #48657a;
  margin: 0;
}

.dc-maze__board {
  margin: 0 auto;
  max-width: 26rem;
  width: 100%;
}

.dc-maze__svg {
  display: block;
  width: 100%;
  height: auto;
}

.dc-maze__bg {
  fill: #fff;
}

.dc-maze__walls {
  stroke: #1a2b3c;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dc-maze__solution {
  stroke: #e08228;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 0.01 10;
  opacity: 0.92;
}

.dc-maze__arrow {
  fill: #39A8DB;
}

.dc-maze__arrow.is-end {
  fill: #ef4444;
}

.dc-maze__icon {
  font-size: 20px;
  dominant-baseline: central;
}

.dc-maze__shape-fill rect {
  fill: #fff;
}

/* Temas — fundo sempre branco; diferença só nas paredes e ícones */
.dc-maze__svg--forest .dc-maze__bg,
.dc-maze__svg--space .dc-maze__bg,
.dc-maze__svg--classic .dc-maze__bg {
  fill: #fff;
}

.dc-maze__svg--forest .dc-maze__shape-fill rect,
.dc-maze__svg--space .dc-maze__shape-fill rect {
  fill: #fff;
}

.dc-maze__svg--forest .dc-maze__walls {
  stroke: #14532d;
}

.dc-maze__svg--forest .dc-maze__solution {
  stroke: #d97706;
}

.dc-maze__svg--space .dc-maze__walls {
  stroke: #1e1b4b;
}

.dc-maze__svg--space .dc-maze__solution {
  stroke: #f59e0b;
}

.dc-maze__footer {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #6c8494;
}

.dc-maze__footer--print {
  display: none;
}

@media (min-width: 768px) {
  .dc-tool:not(.has-result) .dc-crossword__empty,
  .dc-tool:not(.has-result) .dc-maze__empty {
    flex: 1 1 auto;
    min-height: 260px;
  }
}

.content .dc-tool .dc-crossword__empty,
.content .dc-tool .dc-crossword__empty-text,
.content .dc-tool .dc-maze__empty,
.content .dc-tool .dc-maze__empty-text {
  color: #3d5166 !important;
}

.content .dc-tool .dc-crossword__empty-title,
.content .dc-tool .dc-maze__empty-title {
  color: #1a1a1a !important;
}

.content .dc-tool .dc-crossword__title,
.content .dc-tool .dc-maze__title {
  color: #1a1a1a !important;
  text-transform: none;
}

.content .dc-tool .dc-crossword__subtitle,
.content .dc-tool .dc-maze__subtitle,
.content .dc-tool .dc-dots__subtitle,
.content .dc-tool .dc-tracing__subtitle {
  color: #48657a !important;
}

.content .dc-tool .dc-crossword__clue-title {
  color: #1a5f7a !important;
}

.content .dc-tool .dc-crossword__clue-list {
  color: #3d5166 !important;
}

.content .dc-tool .dc-crossword__footer,
.content .dc-tool .dc-maze__footer,
.content .dc-tool .dc-dots__footer,
.content .dc-tool .dc-tracing__footer {
  color: #48657a !important;
}

/* --- Ligar os pontos --- */
.dc-dots__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  min-height: 280px;
  color: #48657a;
}

.dc-dots__empty-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f4f8 0%, #d4ebf3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #1a5f7a;
  margin-bottom: 1rem;
}

.dc-dots__empty-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a5f7a;
  margin: 0 0 0.5rem;
}

.dc-dots__empty-text {
  max-width: 28rem;
  margin: 0;
  line-height: 1.5;
}

.dc-dots__sheet[hidden],
.dc-dots__empty[hidden] {
  display: none !important;
}

.dc-dots__sheet {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2eef3;
}

.dc-dots__header {
  text-align: center;
}

.dc-dots__title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1a5f7a;
  margin: 0 0 0.25rem;
}

.dc-dots__subtitle {
  font-size: 0.875rem;
  color: #48657a;
  margin: 0;
}

.dc-dots__canvas-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem;
}

.dc-dots__canvas {
  display: block;
  max-width: 100%;
  border: 1px dashed #cce0ea;
  border-radius: 8px;
  background: #fff;
}

.dc-dots__footer {
  text-align: center;
  font-size: 0.75rem;
  color: #48657a;
}

.dc-dots__footer--print {
  display: none;
}

@media (min-width: 768px) {
  .dc-tool:not(.has-result) .dc-dots__empty {
    min-height: 360px;
  }
}

.content .dc-tool .dc-dots__empty,
.content .dc-tool .dc-dots__empty-text {
  color: #48657a !important;
}

.content .dc-tool .dc-dots__empty-title {
  color: #1a5f7a !important;
}

.content .dc-tool .dc-dots__title {
  color: #1a5f7a !important;
}

.content .dc-tool .dc-dots__subtitle {
  color: #48657a !important;
}

/* --- Caligrafia / nome pontilhado --- */
.dc-tracing__rule-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
}

.dc-tracing__rule-check {
  width: 1.35rem;
  height: 1.35rem;
  accent-color: #1a5f7a;
}

.dc-tool__optional {
  font-weight: 400;
  color: #8aa3b5;
  font-size: 0.8125rem;
}

.dc-tracing__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  min-height: 280px;
  color: #48657a;
}

.dc-tracing__empty-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f4f8 0%, #d4ebf3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #1a5f7a;
  margin-bottom: 1rem;
}

.dc-tracing__empty-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a5f7a;
  margin: 0 0 0.5rem;
}

.dc-tracing__empty-text {
  max-width: 28rem;
  margin: 0;
  line-height: 1.5;
}

.dc-tracing__sheet[hidden],
.dc-tracing__empty[hidden] {
  display: none !important;
}

.dc-tracing__sheet {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2eef3;
}

.dc-tracing__header {
  text-align: center;
}

.dc-tracing__title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1a5f7a;
  margin: 0 0 0.25rem;
}

.dc-tracing__subtitle {
  font-size: 0.875rem;
  color: #48657a;
  margin: 0;
}

.dc-tracing__canvas-wrap {
  width: 100%;
  overflow-x: auto;
}

.dc-tracing__canvas {
  display: block;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
}

.dc-tracing__footer {
  text-align: center;
  font-size: 0.75rem;
  color: #48657a;
}

.dc-tracing__footer--print {
  display: none;
}

@media (min-width: 768px) {
  .dc-tool:not(.has-result) .dc-tracing__empty {
    min-height: 360px;
  }
}

.content .dc-tool .dc-tracing__empty,
.content .dc-tool .dc-tracing__empty-text {
  color: #48657a !important;
}

.content .dc-tool .dc-tracing__empty-title {
  color: #1a5f7a !important;
}

.content .dc-tool .dc-tracing__title {
  color: #1a5f7a !important;
}

.content .dc-tool .dc-tracing__subtitle {
  color: #48657a !important;
}

/* ------------------------------------------------------------------
   Outras atividades (cross-links entre ferramentas)
   ------------------------------------------------------------------ */
.dc-tool-seo__related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.dc-tool-seo__related li {
  margin: 0;
}

.dc-tool-seo__related a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #1a5f7a;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dc-tool-seo__related a:hover {
  color: #2d8dba;
}
