/**
 * ==============================================================================
 * CGD Ecosystem Modular Header & UI CSS (Gerado por Rust `cgd-guard bundle`)
 * ATENÇÃO: NÃO EDITE ESTE FICHEIRO DIRETAMENTE!
 * Edite apenas o módulo específico em `platform/shared/css/modules/`:
 *   - 01_layout_topbar.css
 *   - 02_header_menus_auth.css
 *   - 03_buttons_tabs_3d.css
 *   - 04_manifesto_typography.css
 *   - 05_plugins_games_quizzes.css
 *   - 06_mybook_feed_composer.css
 *   - 07_vote_bar_appendix.css
 *   - 08_medal_wallet.css
 *   - 09_book_video_player.css
 * ==============================================================================
 */

/* ==========================================================================
 * MÓDULO 01: 01_layout_topbar.css
 * Responsabilidade: Mancha gráfica de 880px, barra superior (.top-bar),
 * contentores principais (.container) e contenção zero-overflow mobile.
 * ========================================================================== */

/* 1. Barra Superior Principal & Mancha Centralizada do Ecossistema (880px úteis, <=1.5mm de margem lateral) */
:root {
  --cgd-mancha-max: 880px;
  --cgd-page-pad: 4px;
}

.top-bar {
  width: 100% !important;
  max-width: calc(var(--cgd-mancha-max, 880px) + (2 * var(--cgd-page-pad, 4px))) !important;
  margin: 0 auto !important;
  padding: 4px 6px 3px 12px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-sizing: border-box !important;
}

.top-bar * {
  box-sizing: border-box;
}

/* Banner Ilustrado de Topo que começa no topo absoluto (0px) por baixo dos botões do header
   Espaçamento abaixo do banner rigorosamente igual a 1.5mm (~6px) em todos os sites */
:root {
  --cgd-gap-15mm: 6px;
}

.cgd-top-hero-banner-wrap,
.mybook-hero-banner-wrap {
  width: 100% !important;
  max-width: calc(var(--cgd-mancha-max, 880px) + (2 * var(--cgd-page-pad, 4px))) !important;
  margin: -42px auto var(--cgd-gap-15mm, 6px) auto !important;
  padding: 0 var(--cgd-page-pad, 4px) !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 1 !important;
}

.cgd-top-hero-banner-card {
  width: 100% !important;
  border-radius: 0 0 14px 14px !important;
  overflow: hidden !important;
  border: 1.5px solid var(--border-card, #B6C8DC) !important;
  border-top: none !important;
  background: var(--card-bg, #0B1325) !important;
  box-shadow: 0 6px 20px rgba(11, 19, 37, 0.16) !important;
}

.mybook-hero-banner-card {
  width: 100% !important;
  border-radius: 0 0 14px 14px !important;
  overflow: visible !important;
  border: 1.5px solid var(--border-card, #B6C8DC) !important;
  border-top: none !important;
  background: var(--card-bg-elevated, #E9F1F8) !important;
  box-shadow: 0 6px 20px rgba(11, 19, 37, 0.16) !important;
}

.cgd-top-hero-artwork,
.mybook-hero-artwork {
  position: relative !important;
  width: 100% !important;
  height: 286px !important;
  overflow: hidden !important;
  background: #0B1325 !important;
}

.cgd-top-hero-artwork img,
.mybook-hero-artwork img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 36% !important;
  display: block !important;
  filter: none !important;
}

.cgd-top-hero-overlay,
.mybook-hero-gradient-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(
    180deg,
    rgba(6, 12, 26, 0.22) 0%,
    rgba(6, 12, 26, 0.0) 35%,
    rgba(6, 12, 26, 0.0) 68%,
    rgba(6, 12, 26, 0.36) 100%
  ) !important;
  pointer-events: none !important;
}

.cgd-top-hero-pills,
.mybook-hero-top-pills {
  display: none !important;
}

.cgd-top-hero-pill-left,
.cgd-top-hero-pill-right {
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.48);
  color: #F8FAFC;
  padding: 4px 11px;
  border-radius: 999px;
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.cgd-top-hero-pill-right {
  border-color: rgba(245, 158, 11, 0.65);
  color: #FDE68A;
}

@media (max-width: 860px) and (min-width: 561px) {
  :root {
    --cgd-page-pad: 6px;
  }

  .cgd-top-hero-banner-wrap,
  .mybook-hero-banner-wrap {
    margin: -43px auto var(--cgd-gap-15mm, 6px) auto !important;
    padding: 0 var(--cgd-page-pad, 6px) !important;
  }

  .cgd-top-hero-artwork,
  .mybook-hero-artwork {
    height: 236px !important;
  }

  .cgd-top-hero-artwork img,
  .mybook-hero-artwork img {
    object-position: center 22% !important;
  }
}

@media (max-width: 560px) {
  :root {
    --cgd-page-pad: 0px;
  }

  .cgd-top-hero-banner-wrap,
  .mybook-hero-banner-wrap {
    margin: -49px auto var(--cgd-gap-15mm, 6px) auto !important;
    padding: 0 !important;
  }

  .cgd-top-hero-banner-card,
  .mybook-hero-banner-card {
    border-radius: 0 0 12px 12px !important;
    border-left: none !important;
    border-right: none !important;
  }

  .cgd-top-hero-artwork,
  .mybook-hero-artwork {
    height: 196px !important;
  }

  .cgd-top-hero-artwork img,
  .mybook-hero-artwork img {
    object-position: center 0% !important;
  }

  .cgd-top-hero-pills,
  .mybook-hero-top-pills {
    bottom: 7px !important;
    left: 7px !important;
    right: 7px !important;
  }

  .cgd-top-hero-pill-left,
  .cgd-top-hero-pill-right {
    font-size: 11.5px;
    padding: 3px 9px;
  }
}

@media (orientation: landscape) and (max-height: 540px) {
  :root {
    --cgd-page-pad: 6px;
  }

  .cgd-top-hero-banner-wrap,
  .mybook-hero-banner-wrap {
    margin: -39px auto var(--cgd-gap-15mm, 6px) auto !important;
    padding: 0 var(--cgd-page-pad, 6px) !important;
  }

  .cgd-top-hero-artwork,
  .mybook-hero-artwork {
    height: 176px !important;
  }

  .cgd-top-hero-artwork img,
  .mybook-hero-artwork img {
    object-position: center 14% !important;
  }
}

html.is-landscape-mobile {
  --cgd-page-pad: 6px;
}

html.is-landscape-mobile .cgd-top-hero-banner-wrap,
html.is-landscape-mobile .mybook-hero-banner-wrap {
  margin: -39px auto var(--cgd-gap-15mm, 6px) auto !important;
  padding: 0 var(--cgd-page-pad, 6px) !important;
}

html.is-landscape-mobile .cgd-top-hero-artwork,
html.is-landscape-mobile .mybook-hero-artwork {
  height: 176px !important;
}

html.is-landscape-mobile .cgd-top-hero-artwork img,
html.is-landscape-mobile .mybook-hero-artwork img {
  object-position: center 14% !important;
}

html.is-mobile-device {
  --cgd-page-pad: 0px;
}

html.is-mobile-device .cgd-top-hero-banner-wrap,
html.is-mobile-device .mybook-hero-banner-wrap {
  margin: -49px auto var(--cgd-gap-15mm, 6px) auto !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

html.is-mobile-device .cgd-top-hero-banner-card,
html.is-mobile-device .mybook-hero-banner-card {
  border-radius: 0 0 12px 12px !important;
  border-left: none !important;
  border-right: none !important;
}

html.is-mobile-device .cgd-top-hero-artwork,
html.is-mobile-device .mybook-hero-artwork {
  height: 196px !important;
}

html.is-mobile-device .cgd-top-hero-artwork img,
html.is-mobile-device .mybook-hero-artwork img {
  object-position: center 0% !important;
}

html.is-mobile-device .container,
html.is-mobile-device .main-container,
html.is-mobile-device .mybook-stream-container,
html.is-mobile-device .mynews-container,
html.is-mobile-device .wallet-container,
html.is-mobile-device .autores-container,
html.is-mobile-device .top-bar {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

/* Quando um navegador mobile (ex: SamsungBrowser em modo Desktop 980px) reporta um layout viewport > 880px,
   remove o limite de 880px de todas as caixas internas para ocuparem 100% da largura do ecrã sem deixar faixas vazias */
html.is-mobile-980 {
  --cgd-mancha-max: 100% !important;
  --cgd-page-pad: 0px !important;
}

html.is-mobile-980 .cgd-manifesto-card,
html.is-mobile-980 .services-grid,
html.is-mobile-980 .service-card,
html.is-mobile-980 .hero-intro-card,
html.is-mobile-980 .book-duo-showcase,
html.is-mobile-980 .cgd-smart-nav-bar,
html.is-mobile-980 .main-nav-tabs,
html.is-mobile-980 .main-tabs-divider,
html.is-mobile-980 .tabs-role-bridge,
html.is-mobile-980 .subtabs-divider,
html.is-mobile-980 .tab-pane,
html.is-mobile-980 .subtab-pane,
html.is-mobile-980 .app-download-card,
html.is-mobile-980 .app-plan-summary-bar,
html.is-mobile-980 .role-bar,
html.is-mobile-980 .autores-container,
html.is-mobile-980 .autores-filter-bar,
html.is-mobile-980 .book-bio-sheet {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

/* Espaço de 1.5mm (6px) exato depois do banner/imagem em todos os sites, zero padding extra no contentor */
header.top-bar + .container,
.top-bar + .container,
.top-bar + main,
.top-bar + .mybook-stream-container,
.cgd-top-hero-banner-wrap + .container,
.cgd-top-hero-banner-wrap + .main-container,
.cgd-top-hero-banner-wrap + main,
.mybook-hero-banner-wrap + .mybook-stream-container,
.mybook-hero-banner-wrap + main {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.container > .hero:first-child,
.container > header.hero:first-child,
.container > section:first-child,
.main-container > header:first-child,
.main-container > section:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Container Principal Universal (Alinhamento rigoroso à esquerda e direita com o Header, <=1.5mm lateral) */
.container,
.main-container,
.mybook-stream-container,
.wallet-container,
.autores-container {
  width: 100% !important;
  max-width: calc(var(--cgd-mancha-max, 880px) + (2 * var(--cgd-page-pad, 4px))) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--cgd-page-pad, 4px) !important;
  padding-right: var(--cgd-page-pad, 4px) !important;
  box-sizing: border-box !important;
}

/* Exceção explícita para painéis de largura expandida (ex: Backoffice Admin) */
.container-wide {
  width: 100% !important;
  max-width: 1300px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box !important;
}

/* 2. Controlos à Direita */
.top-controls {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
  flex-wrap: nowrap !important;
  justify-content: flex-end !important;
}

@media (max-width: 860px) and (min-width: 561px) {
  .top-controls {
    gap: 14px !important;
  }
}

.control-dropdown,
#portalUserSession {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
}


/* ==========================================================================
   12. REGRA PÉTREA MOBILE: CONTENÇÃO TOTAL DE VIEWPORT, POPUPS, MODAIS E TOASTS
   Garante zero overflow horizontal (scrollWidth <= clientWidth) em todos os sites
   e que todas as caixas de confirmação (ex: Reparador/Destruidor), modais e avisos
   cabem 100% dentro de ecrãs mobile standard (360x640, 375x667, 390x844, 412x915).
   ========================================================================== */
html, body {
  max-width: 100vw;
  overflow-x: clip !important;
  -webkit-text-size-adjust: 100% !important;
  -moz-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

body {
  position: relative;
  width: 100%;
}

html.is-mobile-980,
html.is-mobile-980 body {
  max-width: 100% !important;
  width: 100% !important;
}

/* Impede que o Text Autosizer ("Font Boosting") do Samsung Internet infle parágrafos longos
   (como o Manifesto Cívico) por cima do zoom proporcional de 980px */
html.is-mobile-device *,
html.is-mobile-980 * {
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
  max-height: 999999px;
}

.bg-glow {
  left: 0 !important;
  right: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: min(1000px, 100%) !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.mybook-toast:not(.show),
.mybook-toast-notify:not(.show) {
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Contentores de Modais e Popups Universais */
.teaser-modal,
.portal-modal-overlay,
.cgd-popup-overlay {
  position: fixed !important;
  inset: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
  height: 100% !important;
  max-height: 100dvh !important;
  box-sizing: border-box !important;
}

html.is-mobile-980 .teaser-modal,
html.is-mobile-980 .portal-modal-overlay,
html.is-mobile-980 .cgd-popup-overlay {
  max-width: 100% !important;
  padding: 10px !important;
}

html.is-mobile-980 .teaser-modal-content,
html.is-mobile-980 #gameFeedbackBox,
html.is-mobile-980 #gameResultsModal .teaser-modal-content,
html.is-mobile-980 .portal-modal-box,
html.is-mobile-980 .cgd-popup-box {
  width: calc(100% - 20px) !important;
  max-width: calc(100% - 20px) !important;
}

html.is-mobile-980 .mybook-toast,
html.is-mobile-980 .mybook-toast-notify {
  left: 10px !important;
  right: 10px !important;
  width: auto !important;
  max-width: calc(100% - 20px) !important;
}

@media (max-width: 640px) {
  .teaser-modal,
  .portal-modal-overlay,
  .cgd-popup-overlay {
    padding: 10px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .teaser-modal-content,
  #gameFeedbackBox,
  #gameResultsModal .teaser-modal-content,
  .portal-modal-box,
  .cgd-popup-box {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
    padding: 16px 14px 14px !important;
    border-radius: 16px !important;
    margin: auto !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

  .teaser-modal-close,
  .portal-modal-close {
    top: 10px !important;
    right: 10px !important;
    width: 30px !important;
    height: 30px !important;
    font-size: 1.15rem !important;
    z-index: 10 !important;
  }

  /* Caixa de Confirmação de Acerto/Erro (Reparador vs Destruidor & Memória) */
  #gameFeedbackBadge,
  .game-feedback-badge {
    font-size: 0.76rem !important;
    padding: 5px 10px !important;
    margin: 2px 34px -3px 34px !important;
    max-width: calc(100% - 68px) !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.25 !important;
    display: inline-flex !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 3 !important;
  }

  #gameFeedbackVisual {
    width: 102px !important;
    height: 102px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
    position: relative !important;
    z-index: 2 !important;
  }

  #gameFeedbackVisual img {
    width: 100% !important;
    height: 100% !important;
    max-width: 102px !important;
    max-height: 102px !important;
    object-fit: contain !important;
  }

  #gameFeedbackTitle {
    font-size: 1.14rem !important;
    line-height: 1.22 !important;
    margin-top: -4px !important;
    margin-bottom: 6px !important;
    padding: 0 4px !important;
    position: relative !important;
    z-index: 3 !important;
  }

  #gameFeedbackMessage {
    font-size: 0.90rem !important;
    line-height: 1.42 !important;
    padding: 10px 12px !important;
    margin-bottom: 12px !important;
    text-align: left !important;
    hyphens: auto !important;
  }

  /* Modal de Resultados de Fim de Jogo */
  #gameResultsTitle {
    font-size: 1.2rem !important;
    margin-bottom: 6px !important;
    padding: 0 28px !important;
  }

  #gameResultsSubtitle {
    font-size: 0.86rem !important;
    margin-bottom: 12px !important;
  }

  #gameResultsMetricsGrid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 12px !important;
  }

  #gameResultsScoreVal,
  #gameResultsHitsVal,
  #gameResultsMetric3Val {
    font-size: 1.15rem !important;
  }

  #gameResultsFeedbackText {
    font-size: 0.88rem !important;
    line-height: 1.42 !important;
    padding: 10px 12px !important;
    margin-bottom: 14px !important;
    text-align: left !important;
  }

  /* Toasts Flutuantes Contidos no Ecrã Mobile */
  .mybook-toast,
  .mybook-toast-notify {
    left: 12px !important;
    right: 12px !important;
    bottom: 14px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    padding: 10px 14px !important;
    font-size: 0.84rem !important;
    box-sizing: border-box !important;
  }
}

/* Destaque Tipográfico do Trocadilho [R]EVOLUÇÃO / EVOLUÇÃO em todas as línguas */
.rev-r {
  color: #D97706 !important;
  font-weight: 900 !important;
}
:root[data-theme="dark"] .rev-r {
  color: #F59E0B !important;
}
.book-revolution .rev-r,
.card-revolution .card-status .rev-r {
  color: #0284C7 !important;
}
:root[data-theme="dark"] .book-revolution .rev-r,
:root[data-theme="dark"] .card-revolution .card-status .rev-r {
  color: #38BDF8 !important;
}

/* Norma Editorial de Rodape Equilibrado (Zero Palavras Orfas & Nomes Atomicos Inteiros) */
footer p,
#footer-text {
  text-wrap: balance;
  line-height: 1.5;
}

.cgd-nowrap {
  white-space: nowrap;
}

.cgd-footer-rights {
  display: inline-block;
  white-space: nowrap;
}

@media (max-width: 780px) {
  .cgd-footer-rights {
    display: block;
    margin-top: 2px;
  }
}

/* ==========================================================================
 * MÓDULO 02: 02_header_menus_auth.css
 * Responsabilidade: Botões do header (.app-switcher-btn, .control-btn),
 * menus dropdown (#appSwitcherMenu, #roleMenu, #themeMenu, #langMenu),
 * contraste blindado WCAG (Light & Dark), formulário de login e mobile <=768px.
 * ========================================================================== */

/* 3. Formatação Unificada (Alturas E Molduras 100% Iguais) para TODOS os Botões do Header (.app-switcher-btn & .control-btn) */
.top-bar .app-switcher-btn,
.top-bar .control-btn,
.app-switcher-btn,
.control-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 9px 0 0 !important;
  gap: 5px !important;
  background: #183555 !important;
  border: 1.5px solid #38BDF8 !important;
  border-radius: 10px !important;
  color: #F8FAFC !important;
  font-family: 'Fira Sans Condensed', 'Fira Sans', 'Inter', sans-serif !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  line-height: 1 !important;
  cursor: pointer !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.42), 0 2px 5px rgba(10, 37, 64, 0.25) !important;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease !important;
  user-select: none !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  overflow: visible !important;
  position: relative !important;
}

.top-bar .app-switcher-btn:hover,
.top-bar .control-btn:hover,
.app-switcher-btn:hover,
.control-btn:hover {
  background: #1E426B !important;
  border-color: #7DD3FC !important;
  box-shadow: 0 0 11px rgba(125, 211, 252, 0.58), 0 2px 6px rgba(10, 37, 64, 0.32) !important;
  transform: none !important;
}

.control-btn-icon,
#currentRoleIcon,
#currentThemeIcon,
#currentLangFlag,
#portalUserIcon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 17px !important;
  line-height: 1 !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}

.control-btn .control-btn-label {
  font-family: 'Fira Sans Condensed', 'Fira Sans', 'Inter', sans-serif !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  color: inherit !important;
}

/* Destaque em verde escuro de alto contraste quando o utilizador está online com sessão iniciada */
.control-btn.is-logged-in {
  background: rgba(16, 185, 129, 0.16) !important;
  border: 1.5px solid #047857 !important;
  color: #047857 !important;
  font-weight: 800 !important;
  box-shadow: 0 0 10px rgba(4, 120, 87, 0.25) !important;
}

.control-btn.is-logged-in:hover {
  background: rgba(16, 185, 129, 0.26) !important;
  border-color: #065F46 !important;
  color: #065F46 !important;
}

[data-theme="dark"] .control-btn.is-logged-in {
  background: rgba(16, 185, 129, 0.20) !important;
  border: 1.5px solid #10B981 !important;
  color: #34D399 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35) !important;
}

[data-theme="dark"] .control-btn.is-logged-in:hover {
  background: rgba(16, 185, 129, 0.30) !important;
  border-color: #34D399 !important;
  color: #6EE7B7 !important;
}

/* Seta triangular proeminente unificada (.btn-arrow & .cgd-arrow-svg) — Espaçamento Direito 100% Idêntico em todos os botões */
.app-switcher-btn .btn-arrow,
.control-btn .btn-arrow {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 13px !important;
  height: 13px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #052C65 !important;
  opacity: 1 !important;
  transform: none !important;
  transition: transform 0.2s ease !important;
  flex-shrink: 0 !important;
}

.cgd-arrow-svg {
  width: 13px !important;
  height: 13px !important;
  display: block !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
}

[data-theme="dark"] .app-switcher-btn .btn-arrow,
[data-theme="dark"] .control-btn .btn-arrow {
  color: #38BDF8 !important;
}

[data-theme="dark"] .cgd-arrow-svg polygon {
  stroke: #F8FAFC !important;
}

.app-switcher-btn[aria-expanded="true"] .btn-arrow,
.control-btn[aria-expanded="true"] .btn-arrow {
  transform: rotate(180deg) !important;
}

/* 4. Menu Dropdown Genérico (.control-menu) */
.control-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--menu-bg, #0B1324);
  border: 1px solid var(--menu-border, rgba(0, 163, 255, 0.35));
  border-radius: 10px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 5px;
  min-width: 174px;
  box-shadow: var(--menu-shadow, 0 10px 25px rgba(0, 0, 0, 0.4));
  z-index: 1000;
}

.control-menu.open {
  display: flex;
}

.control-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 11px;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 8px;
  color: var(--menu-item-text, #E2E8F0);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.control-menu-item:hover {
  background: var(--menu-item-hover, rgba(0, 163, 255, 0.15));
  color: var(--text-page, #FFFFFF);
  text-decoration: none;
}

.control-menu-item.active {
  background: var(--menu-item-active, rgba(0, 163, 255, 0.25));
  border: 1.5px solid var(--cyan-bright, #00A3FF);
  color: var(--menu-item-active-text, #00A3FF);
  font-weight: 700;
}

/* 5. Central App Switcher Dropdown (.app-switcher-btn & .app-switcher-menu) */
.app-switcher-dropdown {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  z-index: 100;
  flex-shrink: 0 !important;
}

.app-switcher-btn .app-switcher-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.app-switcher-btn .app-switcher-icon svg {
  width: 22px !important;
  height: 22px !important;
  display: block !important;
}

.app-switcher-btn .app-switcher-title {
  font-family: 'Fira Sans Condensed', 'Inter', sans-serif !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
  line-height: 1 !important;
  color: var(--text-heading, #FFFFFF) !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* Ponto circular cinzento sólido entre o título e o ícone do Portal (Modelo header_.png) */
.app-switcher-btn .app-switcher-sep {
  width: 6.5px !important;
  height: 6.5px !important;
  border-radius: 50% !important;
  background: #8E9BAE !important;
  display: inline-block !important;
  margin: 0 2px !important;
  flex-shrink: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
  user-select: none !important;
}

.app-switcher-btn .app-switcher-portal-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0.95 !important;
  flex-shrink: 0 !important;
}

.app-switcher-btn .app-switcher-portal-icon svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}

.app-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  width: 320px;
  max-width: 92vw;
  height: auto !important;
  min-height: 0 !important;
  background: var(--menu-bg, #0B1324);
  border: 1.5px solid var(--border-accent, #0088CC);
  border-radius: 14px !important;
  padding: 8px !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
  display: none;
  flex-direction: column;
  gap: 5px !important;
  z-index: 1000;
}

.app-switcher-menu.open {
  display: flex;
}

#appSwitcherMenu > .cgd-box-exit-floating {
  top: 10px !important;
  right: 10px !important;
}

#appSwitcherMenu > .app-switcher-item:first-of-type {
  padding-right: 48px !important;
}

.app-switcher-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 10px 12px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-page, #FFFFFF);
  text-decoration: none;
  transition: all 0.15s ease;
  position: relative;
}

.app-switcher-item:hover {
  background: var(--menu-item-hover, rgba(0, 163, 255, 0.15));
  transform: translateX(2px);
}

.app-switcher-item.active {
  background: var(--menu-item-active, rgba(0, 163, 255, 0.22));
  border: 1px solid var(--cyan-bright, #00A3FF);
}

.app-item-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--bg-surface-elevated, rgba(255, 255, 255, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.app-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.app-item-sub {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #94A3B8);
  font-weight: 600;
}

.app-item-title {
  font-family: 'Fira Sans Condensed', 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-heading, #FFFFFF);
}

.app-active-pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: #10B981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 2px 7px;
  border-radius: 9999px;
  white-space: nowrap;
}

/* 6. Seletor de Sessão & Papéis (Role Dropdown) + Blindagem de Contraste WCAG (Light & Dark) */
:root:not([data-theme="dark"]) .app-switcher-btn .app-switcher-title,
[data-theme="light"] .app-switcher-btn .app-switcher-title {
  color: #0A2540 !important;
}

[data-theme="dark"] .app-switcher-btn .app-switcher-title {
  color: #FFFFFF !important;
}

:root:not([data-theme="dark"]) .app-switcher-menu,
[data-theme="light"] .app-switcher-menu,
:root:not([data-theme="dark"]) .control-menu,
[data-theme="light"] .control-menu {
  background: #FFFFFF !important;
  border-color: #93ACC8 !important;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22) !important;
}

[data-theme="dark"] .app-switcher-menu,
[data-theme="dark"] .control-menu {
  background: #0B1324 !important;
  border-color: rgba(0, 163, 255, 0.45) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65) !important;
}

:root:not([data-theme="dark"]) .app-switcher-item,
[data-theme="light"] .app-switcher-item {
  color: #0F172A !important;
}

[data-theme="dark"] .app-switcher-item {
  color: #F8FAFC !important;
}

:root:not([data-theme="dark"]) .app-switcher-item:hover,
[data-theme="light"] .app-switcher-item:hover {
  background: #EFF6FF !important;
}

[data-theme="dark"] .app-switcher-item:hover {
  background: rgba(0, 163, 255, 0.16) !important;
}

:root:not([data-theme="dark"]) .app-switcher-item.active,
[data-theme="light"] .app-switcher-item.active {
  background: #E0F2FE !important;
  border: 1.5px solid #0284C7 !important;
}

[data-theme="dark"] .app-switcher-item.active {
  background: rgba(0, 163, 255, 0.22) !important;
  border: 1.5px solid #00A3FF !important;
}

:root:not([data-theme="dark"]) .app-switcher-item .app-item-title,
[data-theme="light"] .app-switcher-item .app-item-title {
  color: #0A2540 !important;
}

[data-theme="dark"] .app-switcher-item .app-item-title {
  color: #FFFFFF !important;
}

:root:not([data-theme="dark"]) .app-switcher-item .app-item-sub,
[data-theme="light"] .app-switcher-item .app-item-sub {
  color: #475569 !important;
}

[data-theme="dark"] .app-switcher-item .app-item-sub {
  color: #94A3B8 !important;
}

:root:not([data-theme="dark"]) .app-switcher-item .app-item-icon-wrap,
[data-theme="light"] .app-switcher-item .app-item-icon-wrap {
  background: #F1F5F9 !important;
  border: 1px solid #CBD5E1 !important;
}

[data-theme="dark"] .app-switcher-item .app-item-icon-wrap {
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
}

:root:not([data-theme="dark"]) .control-menu-item,
[data-theme="light"] .control-menu-item {
  color: #1E293B !important;
  border: 1.5px solid transparent !important;
  border-radius: 8px !important;
}

[data-theme="dark"] .control-menu-item {
  color: #E2E8F0 !important;
  border: 1.5px solid transparent !important;
  border-radius: 8px !important;
}

:root:not([data-theme="dark"]) .control-menu-item:hover,
[data-theme="light"] .control-menu-item:hover {
  background: #F1F5F9 !important;
  color: #0A2540 !important;
}

[data-theme="dark"] .control-menu-item:hover {
  background: rgba(0, 163, 255, 0.16) !important;
  color: #FFFFFF !important;
}

:root:not([data-theme="dark"]) .control-menu-item.active,
[data-theme="light"] .control-menu-item.active {
  background: #E0F2FE !important;
  border: 1.5px solid #0284C7 !important;
  border-radius: 8px !important;
  color: #0A2540 !important;
  font-weight: 800 !important;
}

[data-theme="dark"] .control-menu-item.active {
  background: rgba(0, 163, 255, 0.22) !important;
  border: 1.5px solid #00A3FF !important;
  border-radius: 8px !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
}

/* Identificação Visual Sempre Constante dos Temas Claro e Escuro no Menu do Header (Padrão Artcraft Carlos Dias) */
:root .control-menu-item.theme-item[data-theme-val="light"],
[data-theme="light"] .control-menu-item.theme-item[data-theme-val="light"],
[data-theme="dark"] .control-menu-item.theme-item[data-theme-val="light"] {
  background: #E0F2FE !important;
  border: 1.5px solid #0284C7 !important;
  border-radius: 8px !important;
  color: #0A2540 !important;
  font-weight: 800 !important;
}

:root .control-menu-item.theme-item[data-theme-val="light"]:hover,
[data-theme="light"] .control-menu-item.theme-item[data-theme-val="light"]:hover,
[data-theme="dark"] .control-menu-item.theme-item[data-theme-val="light"]:hover {
  background: #BAE6FD !important;
  border: 1.5px solid #0369A1 !important;
  color: #0A2540 !important;
}

:root .control-menu-item.theme-item[data-theme-val="light"].active,
[data-theme="light"] .control-menu-item.theme-item[data-theme-val="light"].active,
[data-theme="dark"] .control-menu-item.theme-item[data-theme-val="light"].active {
  background: #E0F2FE !important;
  border: 2px solid #0284C7 !important;
  color: #0A2540 !important;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.28) !important;
}

:root .control-menu-item.theme-item[data-theme-val="dark"],
[data-theme="light"] .control-menu-item.theme-item[data-theme-val="dark"],
[data-theme="dark"] .control-menu-item.theme-item[data-theme-val="dark"] {
  background: #183555 !important;
  border: 1.5px solid #359EFF !important;
  border-radius: 8px !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
}

:root .control-menu-item.theme-item[data-theme-val="dark"]:hover,
[data-theme="light"] .control-menu-item.theme-item[data-theme-val="dark"]:hover,
[data-theme="dark"] .control-menu-item.theme-item[data-theme-val="dark"]:hover {
  background: #1E426B !important;
  border: 1.5px solid #60A5FA !important;
  color: #FFFFFF !important;
}

:root .control-menu-item.theme-item[data-theme-val="dark"].active,
[data-theme="light"] .control-menu-item.theme-item[data-theme-val="dark"].active,
[data-theme="dark"] .control-menu-item.theme-item[data-theme-val="dark"].active {
  background: #183555 !important;
  border: 2px solid #359EFF !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 8px rgba(53, 158, 255, 0.35) !important;
}

:root .control-menu-item.theme-item[data-theme-val="light"] span,
[data-theme="light"] .control-menu-item.theme-item[data-theme-val="light"] span,
[data-theme="dark"] .control-menu-item.theme-item[data-theme-val="light"] span {
  color: #0A2540 !important;
}

:root .control-menu-item.theme-item[data-theme-val="dark"] span,
[data-theme="light"] .control-menu-item.theme-item[data-theme-val="dark"] span,
[data-theme="dark"] .control-menu-item.theme-item[data-theme-val="dark"] span {
  color: #FFFFFF !important;
}

:root:not([data-theme="dark"]) .role-item,
[data-theme="light"] .role-item {
  background: #F8FAFC !important;
  border-color: #CBD5E1 !important;
}

[data-theme="dark"] .role-item {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

:root:not([data-theme="dark"]) .role-item .role-item-name,
[data-theme="light"] .role-item .role-item-name {
  color: #0A2540 !important;
}

[data-theme="dark"] .role-item .role-item-name {
  color: #FFFFFF !important;
}

:root:not([data-theme="dark"]) .role-item .role-item-desc,
[data-theme="light"] .role-item .role-item-desc {
  color: #334155 !important;
}

[data-theme="dark"] .role-item .role-item-desc {
  color: #CBD5E1 !important;
}

.role-dropdown .control-menu {
  right: 0;
  width: min(380px, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  max-height: 85vh;
  overflow-y: auto;
  padding: 8px 8px 6px;
  gap: 4px;
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

/* Separador Marcado com Pílula exatamente como no PhotoCraft */
.role-menu-plans-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 6px 0;
}

.role-menu-divider-line {
  flex: 1;
  height: 1px;
  background: rgba(0, 163, 255, 0.35);
}

.role-menu-divider-label {
  font-size: 0.84rem;
  font-weight: 800;
  color: #0A3D73;
  background: #D9E8F8;
  border: 1px solid #9EC3ED;
  border-radius: 9999px;
  padding: 4px 22px;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

[data-theme="dark"] .role-menu-divider-label {
  color: #E2F0FD;
  background: rgba(14, 165, 233, 0.22);
  border-color: rgba(14, 165, 233, 0.45);
}

.role-menu-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.role-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 5px 8px 6px;
  background: var(--bg-card, rgba(255, 255, 255, 0.04));
  border: 1.5px solid var(--border-card, rgba(255, 255, 255, 0.08));
  border-radius: 9px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  width: 100%;
}

.role-item:hover {
  background: var(--bg-card-hover, rgba(0, 163, 255, 0.1));
  border-color: var(--accent-cyan, #00A3FF);
}

.role-item.active {
  background: rgba(14, 165, 233, 0.14) !important;
  border-color: var(--accent-cyan, #00A3FF) !important;
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.22);
}

.role-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.role-item-title-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.role-item-icon {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.role-item-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-card-title, #FFFFFF);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-unavailable-badge {
  color: #EF4444;
  font-weight: 700;
  font-size: 0.72rem;
  margin-left: 4px;
}

.role-item-price {
  font-size: 0.72rem;
  font-weight: 800;
  color: #C07000;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  padding: 1px 6px;
  border-radius: 9999px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.25;
}

[data-theme="dark"] .role-item-price {
  color: var(--accent-gold, #F59E0B);
  background: rgba(217, 119, 6, 0.12);
  border-color: transparent;
}

.role-item.active .role-item-price {
  display: none;
}

.role-item-badge-active {
  display: none;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #10B981;
  color: #FFFFFF;
  padding: 1px 7px;
  border-radius: 9999px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

.role-item.active .role-item-badge-active {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.role-item-desc {
  font-size: 0.73rem;
  color: var(--text-card-body, #CBD5E1);
  line-height: 1.25;
  padding-left: 2px;
  margin-top: 1px;
}

.role-menu-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 8px 6px 4px 6px;
  border-top: 1px solid var(--card-divider, rgba(255, 255, 255, 0.1));
  margin-top: 4px;
  font-size: 0.76rem;
}

.role-menu-link {
  color: var(--accent-cyan, #00A3FF);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  gap: 4px;
  cursor: pointer;
}

.role-menu-link:hover {
  text-decoration: underline;
}

.role-menu-reset-btn {
  background: transparent;
  border: 1px solid var(--card-divider, rgba(255, 255, 255, 0.1));
  color: var(--text-page-muted, #94A3B8);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.role-menu-reset-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: #EF4444;
  color: #EF4444;
}

/* 7. Suporte a Tema Claro ([data-theme="light"]) e Tema Escuro ([data-theme="dark"]) — Todos os Botões (exceto Wallet) com Base Azul-Aço e Traço Exterior Azul Néon Luminoso de Mecanismo */
:root:not([data-theme="dark"]) .top-bar .app-switcher-btn,
:root:not([data-theme="dark"]) .top-bar .control-btn,
:root:not([data-theme="dark"]) .app-switcher-btn,
:root:not([data-theme="dark"]) .control-btn,
[data-theme="light"] .top-bar .app-switcher-btn,
[data-theme="light"] .top-bar .control-btn,
[data-theme="light"] .app-switcher-btn,
[data-theme="light"] .control-btn {
  background: #DCEBFA !important;
  border: 1.5px solid #00A3FF !important;
  border-radius: 10px !important;
  color: #0A2540 !important;
  box-shadow: 0 0 8px rgba(0, 163, 255, 0.36), 0 1px 3px rgba(10, 37, 64, 0.10) !important;
}

:root:not([data-theme="dark"]) .top-bar .app-switcher-btn:hover,
:root:not([data-theme="dark"]) .top-bar .control-btn:hover,
:root:not([data-theme="dark"]) .app-switcher-btn:hover,
:root:not([data-theme="dark"]) .control-btn:hover,
[data-theme="light"] .top-bar .app-switcher-btn:hover,
[data-theme="light"] .top-bar .control-btn:hover,
[data-theme="light"] .app-switcher-btn:hover,
[data-theme="light"] .control-btn:hover {
  background: #CBE3FA !important;
  border-color: #38BDF8 !important;
  color: #0A2540 !important;
  box-shadow: 0 0 11px rgba(56, 189, 248, 0.52), 0 2px 5px rgba(10, 37, 64, 0.14) !important;
}

[data-theme="dark"] .top-bar .app-switcher-btn,
[data-theme="dark"] .top-bar .control-btn,
[data-theme="dark"] .app-switcher-btn,
[data-theme="dark"] .control-btn {
  background: #183555 !important;
  border: 1.5px solid #38BDF8 !important;
  border-radius: 10px !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.44), 0 2px 6px rgba(0, 0, 0, 0.45) !important;
}

[data-theme="dark"] .top-bar .app-switcher-btn:hover,
[data-theme="dark"] .top-bar .control-btn:hover,
[data-theme="dark"] .app-switcher-btn:hover,
[data-theme="dark"] .control-btn:hover {
  background: #1E426B !important;
  border-color: #7DD3FC !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 11px rgba(125, 211, 252, 0.60), 0 2px 6px rgba(0, 0, 0, 0.50) !important;
}

:root:not([data-theme="dark"]) .top-bar .app-switcher-btn .app-switcher-title,
:root:not([data-theme="dark"]) .app-switcher-btn .app-switcher-title,
[data-theme="light"] .top-bar .app-switcher-btn .app-switcher-title,
[data-theme="light"] .app-switcher-btn .app-switcher-title {
  color: #0A2540 !important;
}

[data-theme="dark"] .top-bar .app-switcher-btn .app-switcher-title,
[data-theme="dark"] .app-switcher-btn .app-switcher-title {
  color: #FFFFFF !important;
}

[data-theme="light"] .control-menu {
  background: var(--menu-bg, #FFFFFF);
  border-color: var(--menu-border, #CBD5E1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .control-menu-item {
  color: var(--menu-item-text, #1E293B);
}

[data-theme="light"] .role-item {
  background: #E8F0FA;
  border-color: #7BA7D9;
}

[data-theme="light"] .role-item:hover {
  background: #DFEBF8;
  border-color: #3B82F6;
}

[data-theme="light"] .role-item-name {
  color: #0A3D73;
}

[data-theme="light"] .role-item-desc {
  color: #1E3A5F;
}

/* --------------------------------------------------------------------------
   8. FORMULÁRIO DE LOGIN & RECUPERAÇÃO NA CAIXA DE SESSÃO + BOTÃO X UNIVERSAL
   -------------------------------------------------------------------------- */
/* Botão circular X de saída (estilo Wallet) no canto superior direito de caixas, menus e modais */
.cgd-box-exit-x,
.portal-modal-close,
.teaser-modal-close,
.otp-modal-close {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  border-radius: 50% !important;
  border: 1.5px solid rgba(148, 163, 184, 0.45) !important;
  background: rgba(148, 163, 184, 0.14) !important;
  color: var(--text-page, #0F172A) !important;
  font-size: 0.96rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, color 0.15s ease !important;
  z-index: 25 !important;
}

[data-theme="dark"] .cgd-box-exit-x,
[data-theme="dark"] .portal-modal-close,
[data-theme="dark"] .teaser-modal-close,
[data-theme="dark"] .otp-modal-close {
  color: #F8FAFC !important;
  background: rgba(148, 163, 184, 0.16) !important;
  border-color: rgba(148, 163, 184, 0.42) !important;
}

.cgd-box-exit-x:hover,
.portal-modal-close:hover,
.teaser-modal-close:hover,
.otp-modal-close:hover {
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: #EF4444 !important;
  color: #DC2626 !important;
  transform: scale(1.06);
}

[data-theme="dark"] .cgd-box-exit-x:hover,
[data-theme="dark"] .portal-modal-close:hover,
[data-theme="dark"] .teaser-modal-close:hover,
[data-theme="dark"] .otp-modal-close:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #F87171 !important;
  color: #FCA5A5 !important;
}

.cgd-box-exit-floating {
  position: absolute !important;
  top: 4px !important;
  right: 4px !important;
}

.header-auth-box .cgd-box-exit-floating,
.header-auth-logged .cgd-box-exit-floating {
  top: 4px !important;
  right: 4px !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  font-size: 0.88rem !important;
}

.cgd-dropdown-close-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 6px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  margin-bottom: 2px;
}

.cgd-dropdown-close-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #64748B);
}

[data-theme="dark"] .cgd-dropdown-close-title {
  color: #94A3B8;
}

.header-auth-box {
  background: #F8FAFC;
  border: 1.5px solid #93C5FD;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 5px;
  position: relative;
}

.header-auth-title {
  color: #0369A1 !important;
}

.header-auth-title-warn {
  color: #B45309 !important;
}

[data-theme="dark"] .header-auth-box {
  background: rgba(15, 23, 42, 0.94);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
}

[data-theme="dark"] .header-auth-title {
  color: #38BDF8 !important;
}

[data-theme="dark"] .header-auth-title-warn {
  color: #FBBF24 !important;
}

.header-auth-logged {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  background: #E8F7F0;
  border: 1px solid #C4EBD8;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 6px;
}

[data-theme="dark"] .header-auth-logged {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
}

.header-auth-welcome {
  font-size: 0.8rem;
  font-weight: 700;
  color: #10B981;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.header-auth-user-name {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0E1A2B;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.header-auth-user-name .user-icon {
  color: #2563EB;
  font-size: 1.05rem;
  line-height: 1;
}

[data-theme="dark"] .header-auth-user-name {
  color: #FFFFFF;
}

.header-auth-logout-btn {
  background: #F3DDDD;
  border: 1.5px solid #E57373;
  color: #D32F2F;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 7px 18px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  line-height: 1.25;
  width: 100%;
  margin-top: 2px;
}

.header-auth-logout-btn:hover {
  background: #E57373;
  color: #FFFFFF;
}

.header-auth-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.header-auth-pass-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}

.header-auth-pass-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.header-auth-pass-row .header-auth-input,
.header-auth-pass-wrap .header-auth-input {
  flex: 1 1 auto;
  min-width: 0;
}

.header-auth-input-pass {
  padding-right: 34px !important;
}

.header-pass-eye-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: #64748B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s ease, background 0.15s ease;
  z-index: 3;
}

.header-pass-eye-btn:hover,
.header-pass-eye-btn.is-visible {
  color: #0284C7;
  background: rgba(2, 132, 199, 0.10);
}

[data-theme="dark"] .header-pass-eye-btn {
  color: #94A3B8;
}

[data-theme="dark"] .header-pass-eye-btn:hover,
[data-theme="dark"] .header-pass-eye-btn.is-visible {
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.16);
}

.header-pass-eye-btn .eye-icon-show,
.header-pass-eye-btn .eye-icon-hide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.header-auth-submit-inline {
  width: auto !important;
  flex: 0 0 auto;
  padding: 8px 14px !important;
  white-space: nowrap;
}

.header-auth-input {
  width: 100%;
  padding: 8px 10px;
  background: #FFFFFF !important;
  border: 1.5px solid #94A3B8 !important;
  border-radius: 6px;
  color: #0F172A !important;
  caret-color: #0284C7 !important;
  font-size: 0.84rem;
  font-weight: 600;
  outline: none;
  box-sizing: border-box;
}

.header-auth-input::placeholder {
  color: #64748B !important;
  opacity: 1 !important;
}

.header-auth-input:-webkit-autofill,
.header-auth-input:-webkit-autofill:hover,
.header-auth-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #0F172A !important;
  -webkit-box-shadow: 0 0 0px 1000px #FFFFFF inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

[data-theme="dark"] .header-auth-input {
  background: #0F172A !important;
  border: 1.5px solid rgba(148, 163, 184, 0.45) !important;
  color: #F8FAFC !important;
  caret-color: #38BDF8 !important;
}

[data-theme="dark"] .header-auth-input::placeholder {
  color: #94A3B8 !important;
  opacity: 1 !important;
}

[data-theme="dark"] .header-auth-input:-webkit-autofill,
[data-theme="dark"] .header-auth-input:-webkit-autofill:hover,
[data-theme="dark"] .header-auth-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #F8FAFC !important;
  -webkit-box-shadow: 0 0 0px 1000px #0F172A inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

.header-auth-input:focus {
  border-color: var(--cyan-bright, #00A3FF) !important;
  box-shadow: 0 0 0 2px rgba(0, 163, 255, 0.2) !important;
}

.header-auth-submit-btn {
  width: 100%;
  padding: 8px;
  background: linear-gradient(135deg, #0284C7, #00A3FF);
  border: none;
  border-radius: 6px;
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.header-auth-submit-btn:hover {
  opacity: 0.92;
}

.header-auth-links {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 0.72rem;
  margin-top: 2px;
  width: 100%;
}

.header-auth-link {
  color: #0369A1;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}

[data-theme="dark"] .header-auth-link {
  color: #38BDF8;
}

.header-auth-link:hover {
  text-decoration: underline;
}

.header-auth-msg {
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  line-height: 1.35;
  display: none;
}

.header-unavailable-badge {
  font-size: 0.70rem;
  font-weight: 700;
  color: #EF4444 !important;
  margin-left: 4px;
}

/* Modal Responsivo de Voto & Avisos */
.portal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  box-sizing: border-box;
}

.portal-modal-overlay.show {
  display: flex !important;
}

.portal-modal-box {
  max-width: 460px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: auto !important;
}

.portal-notice-danger {
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 16px 14px !important;
  word-break: break-word !important;
}

/* --------------------------------------------------------------------------
   9. REGRA DE OURO DE RESPONSIVIDADE DO HEADER (3 ESTÁGIOS LIMPOS + 980px)
   Padrão Carlos Dias:
   - Estágio A (561px–860px Intermédio/Tablet): oculta rótulos progressivamente mantendo
     altura fixa (36px), largura automática e ícones de 44px (zero explosão ao redimensionar).
   - Estágio C (<= 560px / is-mobile-device): 5 botões equilibrados sem texto (40px altura).
   - Estágio B (Landscape Mobile <= 540px altura): barra fina horizontal (32px altura,
     largura automática) com ícones proporcionais sem ocupar metade do ecrã.
   -------------------------------------------------------------------------- */

/* Estágio A1 (<= 860px): esconde separador/ícone secundário do portal e labels Tema/Idioma */
@media (max-width: 860px) {
  .app-switcher-btn .app-switcher-sep,
  .app-switcher-btn .app-switcher-portal-icon,
  .top-bar #currentThemeLabel,
  .top-bar #currentLangLabel,
  #currentThemeLabel,
  #currentLangLabel {
    display: none !important;
  }
}

/* Estágio A2 (<= 680px): esconde também título do portal, label do nível e login mantendo width: auto e height: 36px */
@media (max-width: 680px) {
  .app-switcher-btn .app-switcher-title,
  .top-bar #currentRoleLabel,
  .top-bar #portalUserLabel,
  #currentRoleLabel,
  #portalUserLabel {
    display: none !important;
  }

  .role-dropdown .control-menu,
  .app-switcher-dropdown .control-menu,
  .control-dropdown .control-menu {
    position: fixed !important;
    top: 46px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: calc(100% - 16px) !important;
    max-height: calc(100dvh - 56px) !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 99999 !important;
  }
}

/* Estágio C (<= 560px): Smartphone Portrait Compacto — 5 botões uniformes só com ícones 3D */
@media (max-width: 560px) {
  :root {
    --cgd-page-pad: 0px;
  }

  /* Na versão mobile retrato, os contentores ocupam 100% da largura (0px nas laterais) */
  .container,
  .main-container,
  .mybook-stream-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Texto sem caixa mantém o espaço lateral de respiro para não colar ao bordo do vidro */
  .section-title,
  .main-title,
  .main-subtitle,
  .help-hero,
  .partner-hero,
  .section-controls {
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box !important;
  }

  .top-bar {
    padding: 5px 6px 4px 10px !important;
    gap: 11px !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .top-controls {
    gap: 11px !important;
    flex-wrap: nowrap !important;
    flex: 4 1 0 !important;
    justify-content: space-between !important;
    min-width: 0 !important;
  }

  .app-switcher-btn .app-switcher-title,
  .app-switcher-btn .app-switcher-sep,
  .app-switcher-btn .app-switcher-portal-icon,
  .top-bar #currentThemeLabel,
  .top-bar #currentLangLabel,
  .top-bar #currentRoleLabel,
  .top-bar #portalUserLabel,
  #currentThemeLabel,
  #currentLangLabel,
  #currentRoleLabel,
  #portalUserLabel {
    display: none !important;
  }

  .app-switcher-dropdown,
  .top-controls > .control-dropdown,
  .top-controls > #portalUserSession {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    display: flex !important;
  }

  .top-bar .app-switcher-btn,
  .top-bar .control-btn,
  .app-switcher-btn,
  .control-btn,
  .app-switcher-dropdown > .app-switcher-btn,
  .top-controls > .control-dropdown > .control-btn,
  .top-controls > .control-dropdown > .cgd-medal-wallet-btn,
  .top-controls > #portalUserSession > .control-btn {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 62px !important;
    padding: 0 6px 0 0 !important;
    gap: 3px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    flex-shrink: 1 !important;
    justify-content: center !important;
  }

  .app-switcher-btn .app-switcher-icon svg {
    width: 22px !important;
    height: 22px !important;
  }

  .control-btn-icon,
  #currentRoleIcon,
  #currentThemeIcon,
  #currentLangFlag,
  #portalUserIcon {
    font-size: 17px !important;
  }

  .app-switcher-btn .btn-arrow,
  .control-btn .btn-arrow,
  .cgd-arrow-svg {
    width: 11px !important;
    height: 11px !important;
    margin-left: 1px !important;
  }

  .role-dropdown .control-menu,
  .app-switcher-dropdown .control-menu,
  .control-dropdown .control-menu {
    position: fixed !important;
    top: 48px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: calc(100% - 16px) !important;
    max-height: 84dvh !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 99999 !important;
  }

  .portal-modal-box {
    max-width: calc(100% - 20px) !important;
    padding: 20px 14px !important;
  }
}

/* Reforço explícito via classe .is-mobile-device / .cgd-mobile-obj no Header (inclui Samsung 980px em retrato) */
html.is-mobile-device .container,
html.is-mobile-device .main-container,
html.is-mobile-device .mybook-stream-container {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

html.is-mobile-device .section-title,
html.is-mobile-device .main-title,
html.is-mobile-device .main-subtitle,
html.is-mobile-device .help-hero,
html.is-mobile-device .partner-hero,
html.is-mobile-device .section-controls {
  padding-left: 14px !important;
  padding-right: 14px !important;
  box-sizing: border-box !important;
}

html.is-mobile-device .app-switcher-btn .app-switcher-title,
html.is-mobile-device .app-switcher-btn .app-switcher-sep,
html.is-mobile-device .app-switcher-btn .app-switcher-portal-icon,
html.is-mobile-device #currentThemeLabel,
html.is-mobile-device #currentLangLabel,
html.is-mobile-device #currentRoleLabel,
html.is-mobile-device #portalUserLabel,
.top-bar.cgd-mobile-obj .app-switcher-title,
.top-bar.cgd-mobile-obj .app-switcher-sep,
.top-bar.cgd-mobile-obj .app-switcher-portal-icon,
.top-bar.cgd-mobile-obj #currentThemeLabel,
.top-bar.cgd-mobile-obj #currentLangLabel,
.top-bar.cgd-mobile-obj #currentRoleLabel,
.top-bar.cgd-mobile-obj #portalUserLabel {
  display: none !important;
}

html.is-mobile-device .top-bar,
.top-bar.cgd-mobile-obj {
  padding: 5px 6px 4px 10px !important;
  gap: 11px !important;
  justify-content: space-between !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

html.is-mobile-device .top-controls,
.top-bar.cgd-mobile-obj .top-controls {
  gap: 11px !important;
  flex: 4 1 0 !important;
  min-width: 0 !important;
  display: flex !important;
  justify-content: space-between !important;
}

html.is-mobile-device .app-switcher-dropdown,
.top-bar.cgd-mobile-obj .app-switcher-dropdown,
html.is-mobile-device .top-controls > .control-dropdown,
.top-bar.cgd-mobile-obj .top-controls > .control-dropdown,
html.is-mobile-device .top-controls > #portalUserSession,
.top-bar.cgd-mobile-obj .top-controls > #portalUserSession {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  display: flex !important;
}

html.is-mobile-device .top-bar .app-switcher-btn,
html.is-mobile-device .top-bar .control-btn,
.top-bar.cgd-mobile-obj .app-switcher-btn,
.top-bar.cgd-mobile-obj .control-btn,
.app-switcher-btn.cgd-mobile-obj,
.control-btn.cgd-mobile-obj {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 62px !important;
  padding: 0 6px 0 0 !important;
  gap: 3px !important;
  border-radius: 10px !important;
  justify-content: center !important;
}

html.is-mobile-device .app-switcher-btn .btn-arrow,
html.is-mobile-device .control-btn .btn-arrow,
html.is-mobile-device .cgd-arrow-svg,
.top-bar.cgd-mobile-obj .btn-arrow,
.top-bar.cgd-mobile-obj .cgd-arrow-svg {
  width: 11px !important;
  height: 11px !important;
  margin-left: 1px !important;
}

html.is-mobile-device .role-dropdown .control-menu,
html.is-mobile-device .app-switcher-dropdown .control-menu,
html.is-mobile-device .control-dropdown .control-menu,
html.is-mobile-980 .role-dropdown .control-menu,
html.is-mobile-980 .app-switcher-dropdown .control-menu,
html.is-mobile-980 .control-dropdown .control-menu {
  position: fixed !important;
  top: 48px !important;
  left: 6px !important;
  right: 6px !important;
  width: auto !important;
  max-width: calc(100% - 12px) !important;
  max-height: 82dvh !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 99999 !important;
}

/* Estágio B (Telemóvel na Horizontal / Landscape <= 540px de altura):
   Botões compactos (32px altura, largura automática à esquerda/direita) sem inflacionar */
@media (orientation: landscape) and (max-height: 540px) {
  :root {
    --cgd-page-pad: 6px;
  }

  .top-bar {
    padding: 4px 6px 3px 10px !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
  }

  .top-controls {
    gap: 14px !important;
    flex: 0 1 auto !important;
    justify-content: flex-end !important;
  }

  .app-switcher-dropdown,
  .top-controls > .control-dropdown,
  .top-controls > #portalUserSession {
    flex: 0 0 auto !important;
    width: auto !important;
  }

  .app-switcher-btn .app-switcher-sep,
  .app-switcher-btn .app-switcher-portal-icon,
  .top-bar #currentThemeLabel,
  .top-bar #currentLangLabel,
  .top-bar #currentRoleLabel,
  .top-bar #portalUserLabel,
  #currentThemeLabel,
  #currentLangLabel,
  #currentRoleLabel,
  #portalUserLabel {
    display: none !important;
  }

  .top-bar .app-switcher-btn,
  .top-bar .control-btn,
  .app-switcher-btn,
  .control-btn,
  .app-switcher-dropdown > .app-switcher-btn,
  .top-controls > .control-dropdown > .control-btn,
  .top-controls > .control-dropdown > .cgd-medal-wallet-btn,
  .top-controls > #portalUserSession > .control-btn {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    width: auto !important;
    min-width: 42px !important;
    max-width: none !important;
    padding: 0 7px 0 0 !important;
    gap: 4px !important;
    border-radius: 9px !important;
    font-size: 13.5px !important;
  }

  .app-switcher-btn .btn-arrow,
  .control-btn .btn-arrow,
  .cgd-arrow-svg {
    width: 11px !important;
    height: 11px !important;
  }

  .role-dropdown .control-menu,
  .app-switcher-dropdown .control-menu,
  .control-dropdown .control-menu {
    position: fixed !important;
    top: 42px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: calc(100% - 16px) !important;
    max-height: calc(100dvh - 48px) !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 99999 !important;
  }
}

@media (orientation: landscape) and (max-height: 540px) and (max-width: 720px) {
  .app-switcher-btn .app-switcher-title {
    display: none !important;
  }
}

html.is-landscape-mobile .top-bar {
  padding: 4px 6px 3px 10px !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
}

html.is-landscape-mobile .top-controls {
  gap: 14px !important;
  flex: 0 1 auto !important;
  justify-content: flex-end !important;
}

html.is-landscape-mobile .app-switcher-dropdown,
html.is-landscape-mobile .top-controls > .control-dropdown,
html.is-landscape-mobile .top-controls > #portalUserSession {
  flex: 0 0 auto !important;
  width: auto !important;
}

html.is-landscape-mobile .app-switcher-btn .app-switcher-sep,
html.is-landscape-mobile .app-switcher-btn .app-switcher-portal-icon,
html.is-landscape-mobile #currentThemeLabel,
html.is-landscape-mobile #currentLangLabel,
html.is-landscape-mobile #currentRoleLabel,
html.is-landscape-mobile #portalUserLabel {
  display: none !important;
}

html.is-landscape-mobile .top-bar .app-switcher-btn,
html.is-landscape-mobile .top-bar .control-btn,
html.is-landscape-mobile .app-switcher-btn,
html.is-landscape-mobile .control-btn,
html.is-landscape-mobile .app-switcher-dropdown > .app-switcher-btn,
html.is-landscape-mobile .top-controls > .control-dropdown > .control-btn,
html.is-landscape-mobile .top-controls > .control-dropdown > .cgd-medal-wallet-btn,
html.is-landscape-mobile .top-controls > #portalUserSession > .control-btn {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  width: auto !important;
  min-width: 42px !important;
  max-width: none !important;
  padding: 0 7px 0 0 !important;
  gap: 4px !important;
  border-radius: 9px !important;
  font-size: 13.5px !important;
}

html.is-landscape-mobile .app-switcher-btn .btn-arrow,
html.is-landscape-mobile .control-btn .btn-arrow,
html.is-landscape-mobile .cgd-arrow-svg {
  width: 11px !important;
  height: 11px !important;
}

html.is-landscape-mobile .role-dropdown .control-menu,
html.is-landscape-mobile .app-switcher-dropdown .control-menu,
html.is-landscape-mobile .control-dropdown .control-menu {
  position: fixed !important;
  top: 42px !important;
  left: 8px !important;
  right: 8px !important;
  width: auto !important;
  max-width: calc(100% - 16px) !important;
  max-height: calc(100dvh - 48px) !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 99999 !important;
}

/* ==========================================================================
   10. CAIXA DE AVISO DE SOBRECARGA DO SERVIDOR (SERVER OVERLOAD MODAL)
   ========================================================================== */
.cgd-overload-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 11, 22, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.cgd-overload-overlay.show {
  display: flex !important;
}

.cgd-overload-card {
  background: var(--bg-card, #0F172A);
  border: 2px solid #F59E0B;
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  padding: 24px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  color: var(--text-card-body, #E2E8F0);
  box-sizing: border-box;
  position: relative;
}

.cgd-overload-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.55);
  color: #FBBF24;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

html[data-theme="light"] .cgd-overload-badge {
  background: #FEF3C7;
  border-color: #D97706;
  color: #92400E;
}

.cgd-overload-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-card-title, #FFFFFF);
  margin: 0 0 10px 0;
  line-height: 1.3;
}

.cgd-overload-body {
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--text-card-body, #CAD7E6);
  margin: 0 0 12px 0;
}

.cgd-overload-admin-box {
  background: rgba(16, 185, 129, 0.10);
  border-left: 3px solid #10B981;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-card-body, #E2E8F0);
  margin: 12px 0 18px 0;
}

.cgd-overload-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.cgd-overload-btn {
  padding: 10px 18px;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid #F59E0B;
  background: #F59E0B;
  color: #0B1324;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.cgd-overload-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* ==========================================================================
 * MÓDULO 03: 03_buttons_tabs_3d.css
 * Responsabilidade: Sistema unificado de botões Luxury 3D Studio (.cgd-btn-3d-icon),
 * barra de tabs principal (.main-nav-tabs, .tab-btn), sub-tabs (.subtabs-nav),
 * divisores 18px (.main-tabs-divider) e regra global .cgd-mybook-brand.
 * ========================================================================== */

/* ==========================================================================
   15. SISTEMA UNIFICADO DE BOTÕES LUXURY 3D STUDIO & TABS (PADRÃO CARLOS DIAS)
   - Traço cinzento unificado (#B6C6DB no tema claro, #64748B no tema escuro)
   - Arredondado idêntico (border-radius: 10px) em Header, Manifesto e Tabs
   - Barra cinzenta de fundo dos Tabs mais alta (18px, #B6C6DB, topo arredondado 12px)
   - Ícones 3D de estúdio (NanoBanana / aging_backwards) com ligeiro relevo para fora do botão
   ========================================================================== */

.cgd-manifesto-card,
.cgd-manifesto-actions,
.cgd-manifesto-col {
  overflow: visible !important;
}

/* Ícones 3D de Estúdio Universais */
.cgd-btn-3d-icon {
  display: inline-block !important;
  width: auto !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  pointer-events: none !important;
  user-select: none !important;
  vertical-align: middle !important;
  filter: drop-shadow(0 3px 5px rgba(8, 24, 54, 0.36)) drop-shadow(0 1px 1.5px rgba(8, 24, 54, 0.22)) !important;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), filter 0.2s ease !important;
}

/* Ícones 3D no Header (.app-switcher-btn & .control-btn — Out-of-the-Box Left & Top/Bottom sobre botão de 36px) */
.app-switcher-btn .app-switcher-icon .cgd-btn-3d-icon,
.control-btn .cgd-btn-3d-icon {
  height: 44px !important;
  max-width: 54px !important;
  margin: -9px 0 -9px -9px !important;
  transform: translateY(-0.5px);
}

/* Ícone do Portal mais decidido (maior relevo para fora do botão) e 2px mais abaixo */
.app-switcher-btn .app-switcher-icon .cgd-btn-3d-icon[src*="header_portal"] {
  height: 48px !important;
  max-width: 56px !important;
  margin: -11px 0 -11px -9px !important;
  transform: translateY(2px) !important;
}

.app-switcher-btn .app-switcher-portal-icon .cgd-btn-3d-icon {
  height: 48px !important;
  max-width: 56px !important;
  margin: -11px 0 !important;
  transform: translateY(2px) !important;
}

.app-switcher-menu .app-item-icon-wrap {
  overflow: visible !important;
}

.app-switcher-menu .app-item-icon-wrap .cgd-btn-3d-icon,
.app-switcher-menu .app-item-icon .cgd-btn-3d-icon {
  height: 38px !important;
  width: 38px !important;
  object-fit: contain !important;
}

.role-item-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}

.role-item-icon .cgd-btn-3d-icon {
  height: 30px !important;
  max-width: 34px !important;
  margin: -5px 0 !important;
}

/* Bandeiras 3D no Botão do Header e no Menu Dropdown de Idiomas — Dimensões 100% Uniformes */
#currentLangFlag {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#currentLangFlag .cgd-btn-3d-icon {
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 28px !important;
  margin: -4px 0 -4px -7px !important;
  object-fit: fill !important;
}

.lang-item > span:first-child,
.theme-item > span:first-child {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 25px !important;
  flex-shrink: 0 !important;
}

.lang-item .cgd-btn-3d-icon {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 25px !important;
  margin: 0 !important;
  object-fit: fill !important;
}

.theme-item .cgd-btn-3d-icon {
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  height: 25px !important;
  margin: 0 !important;
  object-fit: contain !important;
}

/* Ícones 3D nos 4 Botões do Manifesto Cívico (Out-of-the-Box 3D: saem claramente da altura de 36px do botão,
   EXCEÇÃO ESTÉTICA CARLOS DIAS: distância 0mm ao topo da legenda para que a sombra suave do ícone 3D fique ligeiramente sobre o texto) */
.cgd-manifesto-btn .cgd-btn-3d-icon {
  height: 48px !important;
  max-width: 84px !important;
  margin: -10px 0 -10px -10px !important;
  transform: translateY(-1px);
  filter: drop-shadow(0 4px 6.5px rgba(6, 18, 42, 0.46)) drop-shadow(0 1.5px 2px rgba(6, 18, 42, 0.32)) !important;
}

.cgd-manifesto-btn .cgd-btn-3d-icon.icon-vote-wide {
  height: 49px !important;
  max-width: 90px !important;
  margin: -10px 0 -10px -12px !important;
  transform: translateY(-1px);
}

.cgd-manifesto-btn .cgd-btn-3d-icon.icon-ajude-pop {
  height: 50px !important;
  max-width: 72px !important;
  margin: -10px 0 -10px -10px !important;
  transform: translateY(-1px);
}

.cgd-manifesto-btn .cgd-btn-3d-icon.icon-parcerias-wide {
  height: 48px !important;
  max-width: 72px !important;
  margin: -10px 0 -10px -11px !important;
  transform: translateY(-1px);
}

.cgd-manifesto-btn:hover .cgd-btn-3d-icon {
  transform: translateY(-2.5px) scale(1.06);
  filter: drop-shadow(0 5.5px 9px rgba(6, 18, 42, 0.52)) drop-shadow(0 2px 3px rgba(6, 18, 42, 0.35)) !important;
}

.cgd-manifesto-btn:hover .cgd-btn-3d-icon.icon-ajude-pop {
  transform: translateY(-3px) scale(1.06);
}

/* Barra de Tabs Principal & Barra Cinzenta de Fundo (Modelo Photoshop Carlos Dias) */
.main-nav-tabs {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 28px !important;
  max-width: var(--cgd-mancha-max, 880px) !important;
  width: 100% !important;
  margin: 10px auto 0 auto !important;
  padding: 0 14px !important;
  position: relative !important;
  z-index: 2 !important;
  box-sizing: border-box !important;
  flex-wrap: nowrap !important;
  overflow: visible !important;
}

.tab-btn {
  width: auto !important;
  min-width: 0 !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 16px 0 0 !important;
  border-radius: 10px !important;
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  border: 1.5px solid #B6C6DB !important;
  background: #DEE5F0 !important;
  color: #1C3E74 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.08) !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  position: relative !important;
  overflow: visible !important;
}

.tab-btn .tab-btn-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  line-height: 1 !important;
}

.tab-btn .tab-btn-text-short {
  display: none !important;
}

.tab-btn .tab-btn-text-full {
  display: inline !important;
}

.tab-btn:hover {
  background: #E8EFF8 !important;
  border-color: #93ACC8 !important;
  color: #0F294A !important;
}

.tab-btn.active {
  background: #3467AB !important;
  color: #FFFFFF !important;
  border: 1.5px solid #B6C6DB !important;
  box-shadow: 0 3px 9px rgba(29, 78, 137, 0.25) !important;
}

[data-theme="dark"] .tab-btn {
  background: #1A2438 !important;
  border: 1.5px solid #64748B !important;
  color: #CBD5E1 !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35) !important;
}

[data-theme="dark"] .tab-btn:hover {
  background: #24324D !important;
  border-color: #94A3B8 !important;
  color: #FFFFFF !important;
}

[data-theme="dark"] .tab-btn.active {
  background: #2563EB !important;
  color: #FFFFFF !important;
  border: 1.5px solid #94A3B8 !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4) !important;
}

/* Ícones 3D dentro dos Tabs Principais (Out-of-the-Box 3D: 48px sobre botão de 36px, saindo ligeiramente pela esquerda) */
.tab-btn .cgd-btn-3d-icon {
  height: 48px !important;
  max-width: 58px !important;
  margin: -10px 0 -10px -10px !important;
  transform: translateY(-0.5px);
  filter: drop-shadow(0 3.5px 6px rgba(8, 24, 54, 0.40)) drop-shadow(0 1px 2px rgba(8, 24, 54, 0.24)) !important;
}

.tab-btn:hover .cgd-btn-3d-icon,
.tab-btn.active .cgd-btn-3d-icon {
  transform: translateY(-2px) scale(1.05);
  filter: drop-shadow(0 5px 8px rgba(8, 24, 54, 0.46)) drop-shadow(0 1.5px 2.5px rgba(8, 24, 54, 0.28)) !important;
}

/* Risco / Barra Cinzenta no Fundo dos Tabs com Altura Maior (18px, #B6C6DB, igual ao traço dos botões) */
.main-tabs-divider,
.subtabs-divider {
  width: 100% !important;
  max-width: var(--cgd-mancha-max, 880px) !important;
  height: 18px !important;
  background: #B6C6DB !important;
  border-radius: 12px 12px 0 0 !important;
  margin: -21px auto 0 auto !important;
  position: relative !important;
  z-index: 1 !important;
  box-shadow: none !important;
}

[data-theme="dark"] .main-tabs-divider,
[data-theme="dark"] .subtabs-divider {
  background: #334155 !important;
  box-shadow: none !important;
}

/* ============================================================================
   FUNDO CINZA UNIFICADO DAS PÁGINAS DOS TABS & SUB-TABS (PADRÃO CARLOS DIAS)
   - Todo o conteúdo dentro das páginas dos tabs (.tab-pane) e sub-tabs (.subtab-pane)
     que não esteja dentro de caixas tem o fundo cinza dos tabs (#B6C6DB / #334155).
   - EXCEÇÃO: No tab Extras (#tab-app), a zona onde assentam os botões dos sub-tabs
     (entre o bloco de cabeçalho superior "Extras - compatíveis myBOOK" e a barra
     .subtabs-divider) mantém o fundo branco da página para evidenciar os sub-tabs!
   ============================================================================ */
.tabs-role-bridge {
  max-width: var(--cgd-mancha-max, 880px) !important;
  width: 100% !important;
  background: #B6C6DB !important;
  margin: 0 auto !important;
  padding: 4px 6px 4px 6px !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 1 !important;
}

[data-theme="dark"] .tabs-role-bridge {
  background: #334155 !important;
}

.tab-pane:not(#tab-app),
.subtab-pane {
  max-width: var(--cgd-mancha-max, 880px) !important;
  width: 100% !important;
  background: #B6C6DB !important;
  margin: 0 auto !important;
  padding: 5px 6px 8px 6px !important;
  border-radius: 0 0 12px 12px !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 1 !important;
}

[data-theme="dark"] .tab-pane:not(#tab-app),
[data-theme="dark"] .subtab-pane {
  background: #334155 !important;
}

/* Exceção #tab-app (Extras): o tab-pane tem fundo transparente (branco da página) na zona dos botões sub-tabs,
   mas o cabeçalho de topo (.section-title:first-child) e o corpo da sub-tab (.subtab-pane) têm o fundo cinza */
#tab-app {
  max-width: var(--cgd-mancha-max, 880px) !important;
  width: 100% !important;
  background: transparent !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

#tab-app > .section-title:first-child {
  max-width: var(--cgd-mancha-max, 880px) !important;
  width: 100% !important;
  background: #B6C6DB !important;
  margin: 0 auto 10px auto !important;
  padding: 5px 10px 6px 10px !important;
  border-radius: 0 0 10px 10px !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 1 !important;
}

[data-theme="dark"] #tab-app > .section-title:first-child {
  background: #334155 !important;
}

/* Títulos de secção (.section-title) sobre o fundo cinza dos tabs */
.tab-pane .section-title {
  margin: 2px auto 6px auto !important;
  padding: 2px 8px 3px 8px !important;
  background: transparent !important;
}

.tab-pane > .section-title:first-child {
  margin: 0 auto 6px auto !important;
  padding: 3px 8px 4px 8px !important;
}

.tab-pane .section-title h2 {
  margin: 0 !important;
  line-height: 1.04 !important;
  letter-spacing: -0.01em !important;
  color: #0C3E75 !important;
}

[data-theme="dark"] .tab-pane .section-title h2 {
  color: #FFFFFF !important;
}

.tab-pane .section-title p {
  margin: 1px auto 0 auto !important;
  line-height: 1.15 !important;
  color: #253B56 !important;
  max-width: 580px !important;
}

[data-theme="dark"] .tab-pane .section-title p {
  color: #CBD5E1 !important;
}

/* No tab myBOOK, o cabeçalho cinza encosta à caixa do filtro dos livros (que perde o arredondado em cima),
   e o fundo cinza do tab envolve todo o feed e os cartões de post */
#tab-mybook {
  padding: 0 10px 12px 10px !important;
}

#tab-mybook > .section-title:first-child {
  margin: 0 auto !important;
  border-radius: 0 !important;
  padding: 6px 14px 8px 14px !important;
}

#tab-mybook > .mybook-stream-container {
  padding: 0 !important;
  margin-top: 0 !important;
  gap: 10px !important;
}

#tab-mybook .mybook-book-filter-bar {
  width: 100% !important;
  margin-top: 0 !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
  border-top: none !important;
  padding: 5px 12px 7px 12px !important;
  gap: 4px !important;
  box-sizing: border-box !important;
}

/* Sub-tabs (Ferramentas, Questionários, Jogos) — Mesma Moldura Cinzenta (#B6C6DB), Arredondado (10px) e Ícones 3D Out-of-the-Box */
.subtabs-nav {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 28px !important;
  max-width: var(--cgd-mancha-max, 880px) !important;
  width: 100% !important;
  margin: 10px auto 0 auto !important;
  padding: 0 14px !important;
  position: relative !important;
  z-index: 2 !important;
  box-sizing: border-box !important;
  flex-wrap: nowrap !important;
  overflow: visible !important;
}

.subtab-btn {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 6px 0 0 !important;
  border-radius: 10px !important;
  border: 1.5px solid #B6C6DB !important;
  background: #DEE5F0 !important;
  color: #1C3E74 !important;
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  position: relative !important;
  overflow: visible !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  transition: all 0.18s ease !important;
}

.subtab-btn .subtab-icon-wrap {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

.subtab-btn .subtab-label {
  display: inline-block !important;
  line-height: 1 !important;
}

.subtab-btn .subtab-count {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 24px !important;
  height: 24px !important;
  padding: 0 6px !important;
  margin-left: 2px !important;
  margin-right: -10px !important;
  border-radius: 8px !important;
  background: #EFF5FB !important;
  border: 1.5px solid #B6C6DB !important;
  color: #1C3E74 !important;
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08) !important;
  flex-shrink: 0 !important;
}

.subtab-btn.active .subtab-count {
  background: #4F7BC0 !important;
  border-color: #B6C6DB !important;
  color: #FFFFFF !important;
}

[data-theme="dark"] .subtab-btn .subtab-count {
  background: #0F172A !important;
  border-color: #64748B !important;
  color: #E2E8F0 !important;
}

[data-theme="dark"] .subtab-btn.active .subtab-count {
  background: #1D4ED8 !important;
  border-color: #94A3B8 !important;
  color: #FFFFFF !important;
}

.mybook-filter-pill,
.tab-filter-btn {
  border-radius: 10px !important;
  border: 1.5px solid #B6C6DB !important;
  overflow: visible !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  position: relative !important;
}

[data-theme="dark"] .mybook-filter-pill,
[data-theme="dark"] .tab-filter-btn {
  border: 1.5px solid #64748B !important;
}

.mybook-filter-pill .cgd-btn-3d-icon {
  height: 38px !important;
  max-width: 46px !important;
  margin: -7px 0 -7px -7px !important;
  transform: translateY(-0.5px);
}

.subtab-btn:hover {
  background: #E8EFF8 !important;
  border-color: #93ACC8 !important;
}

.subtab-btn.active {
  background: #3467AB !important;
  color: #FFFFFF !important;
  border: 1.5px solid #B6C6DB !important;
}

[data-theme="dark"] .subtab-btn {
  background: #1A2438 !important;
  border: 1.5px solid #64748B !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .subtab-btn.active {
  background: #2563EB !important;
  border: 1.5px solid #94A3B8 !important;
  color: #FFFFFF !important;
}

/* Ícones 3D nas Sub-tabs (Out-of-the-Box 3D: 48px sobre botão de 36px, saindo pela esquerda) */
.subtab-btn .cgd-btn-3d-icon {
  height: 48px !important;
  max-width: 58px !important;
  margin: -10px 0 -10px -10px !important;
  transform: translateY(-0.5px);
  filter: drop-shadow(0 3.5px 6px rgba(8, 24, 54, 0.40)) drop-shadow(0 1px 2px rgba(8, 24, 54, 0.24)) !important;
}

.subtab-btn:hover .cgd-btn-3d-icon,
.subtab-btn.active .cgd-btn-3d-icon {
  transform: translateY(-2px) scale(1.05);
  filter: drop-shadow(0 5px 8px rgba(8, 24, 54, 0.46)) drop-shadow(0 1.5px 2.5px rgba(8, 24, 54, 0.28)) !important;
}

/* Out-of-the-Box 3D em Botões de Plugins, Comandos Sociais, Composer, Badges e KPIs */
.btn-pin-plugin,
.post-social-cmd,
.btn-composer-action,
.btn-composer-cmd,
#btnActionImageText,
#btnActionImageTextSuite,
#btnActionPluginText,
#btnActionPluginTextSuite,
.post-book-badge,
.post-category-badge,
.role-badge,
.help-card-icon,
.partner-card-icon,
.kpi-icon-box,
.role-menu-link {
  overflow: visible !important;
  position: relative !important;
}

#btnActionImageText,
#btnActionImageTextSuite,
#btnActionPluginText,
#btnActionPluginTextSuite {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  line-height: 1 !important;
}

.btn-pin-plugin .cgd-btn-3d-icon {
  height: 34px !important;
  max-width: 40px !important;
  margin: -7px 0 !important;
  transform: translateY(-1px);
}

.post-social-cmd .cgd-btn-3d-icon,
.social-cmd-icon .cgd-btn-3d-icon {
  height: 32px !important;
  max-width: 38px !important;
  margin: -6px 0 !important;
  transform: translateY(-0.5px);
}

.btn-composer-action .cgd-btn-3d-icon,
.btn-composer-cmd .cgd-btn-3d-icon {
  height: 46px !important;
  max-width: 54px !important;
  margin: -9px 0 -9px -9px !important;
  transform: translateY(-0.5px);
  filter: drop-shadow(0 3.5px 6px rgba(10, 37, 74, 0.34)) !important;
}

.btn-composer-cmd:hover .cgd-btn-3d-icon,
.btn-composer-cmd.has-active .cgd-btn-3d-icon {
  transform: translateY(-2px) scale(1.06);
  filter: drop-shadow(0 4.5px 8px rgba(10, 37, 74, 0.42)) !important;
}

.post-book-badge .cgd-btn-3d-icon,
.post-category-badge .cgd-btn-3d-icon,
.role-badge .cgd-btn-3d-icon,
.role-menu-link .cgd-btn-3d-icon {
  height: 28px !important;
  max-width: 34px !important;
  margin: -5px 0 !important;
}

.help-card-icon .cgd-btn-3d-icon,
.partner-card-icon .cgd-btn-3d-icon,
.kpi-icon-box .cgd-btn-3d-icon {
  height: 52px !important;
  max-width: 68px !important;
  margin: -10px 0 !important;
}

/* Responsividade Estágio A (Intermédio 561px–768px): textos curtos nos tabs, ícones estáveis */
@media (max-width: 768px) and (min-width: 561px) {
  .tab-btn .tab-btn-text-full {
    display: none !important;
  }

  .tab-btn .tab-btn-text-short {
    display: inline !important;
  }

  .main-nav-tabs,
  .subtabs-nav {
    gap: 20px !important;
  }

  .tab-btn {
    padding: 0 13px 0 0 !important;
    gap: 6px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
  }

  .tab-btn .cgd-btn-3d-icon,
  .subtab-btn .cgd-btn-3d-icon {
    height: 46px !important;
    max-width: 54px !important;
    margin: -9px 0 -9px -9px !important;
  }
}

@media (max-width: 640px) and (min-width: 561px) {
  .subtab-btn .subtab-label {
    display: none !important;
  }

  .subtab-btn {
    padding: 0 8px 0 0 !important;
  }
}

/* Responsividade Estágio C (<= 560px): Smartphone Portrait Compacto — Out-of-the-Box Left & Finger-Friendly */
@media (max-width: 560px) {
  .app-switcher-btn .app-switcher-icon .cgd-btn-3d-icon,
  .control-btn .cgd-btn-3d-icon {
    height: 45px !important;
    max-width: 48px !important;
    margin: -7px 0 -7px -7px !important;
  }

  #currentLangFlag .cgd-btn-3d-icon {
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 27px !important;
    margin: -4px 0 -4px -5px !important;
    object-fit: fill !important;
  }

  .app-switcher-btn .app-switcher-icon .cgd-btn-3d-icon[src*="header_portal"] {
    height: 48px !important;
    max-width: 52px !important;
    margin: -9px 0 -9px -7px !important;
    transform: translateY(2px) !important;
  }

  .app-switcher-btn .app-switcher-portal-icon .cgd-btn-3d-icon {
    height: 48px !important;
    max-width: 52px !important;
    margin: -9px 0 !important;
    transform: translateY(2px) !important;
  }

  .cgd-manifesto-btn {
    height: 38px !important;
    min-height: 38px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 12px 0 0 !important;
    gap: 6px !important;
    border-radius: 10px !important;
    font-size: 0.94rem !important;
    justify-content: center !important;
  }

  .cgd-manifesto-btn > span:not(.cgd-manifesto-btn-icon) {
    display: inline !important;
  }

  .cgd-manifesto-btn .cgd-btn-3d-icon {
    height: 46px !important;
    max-width: 78px !important;
    margin: -8px 0 -8px -9px !important;
  }

  .cgd-manifesto-btn .cgd-btn-3d-icon.icon-vote-wide {
    height: 47px !important;
    max-width: 84px !important;
    margin: -8px 0 -8px -10px !important;
  }

  .cgd-manifesto-btn .cgd-btn-3d-icon.icon-ajude-pop {
    height: 48px !important;
    max-width: 68px !important;
    margin: -9px 0 -7px -9px !important;
    transform: translateY(-2px);
  }

  .cgd-manifesto-btn .cgd-btn-3d-icon.icon-parcerias-wide {
    height: 46px !important;
    max-width: 68px !important;
    margin: -7px 0 -7px -9px !important;
  }

  .main-nav-tabs {
    gap: 16px !important;
    padding: 0 10px !important;
    justify-content: center !important;
  }

  .tab-btn {
    flex: 1 1 0 !important;
    max-width: 68px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0 4px !important;
    font-size: 14px !important;
    gap: 0 !important;
    border-radius: 11px !important;
    justify-content: center !important;
  }

  .tab-btn .cgd-btn-3d-icon {
    height: 48px !important;
    max-width: 58px !important;
    margin: -8px 0 !important;
  }

  .btn-composer-cmd .cgd-btn-3d-icon {
    height: 46px !important;
    max-width: 54px !important;
    margin: -7px 0 -7px -8px !important;
  }

  /* Em mobile retrato, oculta os textos dos tabs para botões só com ícones 3D */
  .tab-btn .tab-btn-text-full,
  .tab-btn .tab-btn-text-short {
    display: none !important;
  }

  .mybook-filter-pill .cgd-btn-3d-icon {
    height: 38px !important;
    max-width: 44px !important;
    margin: -6px 0 -6px -6px !important;
  }

  .main-tabs-divider,
  .subtabs-divider {
    height: 18px !important;
    margin: -21px auto 0 auto !important;
    border-radius: 12px 12px 0 0 !important;
  }

  .tabs-role-bridge {
    padding: 4px 6px 4px 6px !important;
  }

  .tab-pane:not(#tab-app),
  .subtab-pane {
    padding: 6px 6px 10px 6px !important;
    border-radius: 0 0 12px 12px !important;
  }

  #tab-mybook {
    padding: 0 6px 10px 6px !important;
  }

  #tab-mybook > .mybook-stream-container {
    padding: 0 !important;
    gap: 10px !important;
  }

  #tab-mybook .mybook-book-filter-bar {
    width: 100% !important;
  }

  .subtabs-nav {
    gap: 18px !important;
    padding: 0 10px !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
  }

  .subtab-btn {
    flex: 1 1 0 !important;
    max-width: 92px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0 8px 0 0 !important;
    font-size: 14px !important;
    gap: 5px !important;
    border-radius: 11px !important;
    flex-shrink: 0 !important;
    justify-content: center !important;
  }

  .subtab-btn .subtab-label {
    display: none !important;
  }

  .subtab-btn .cgd-btn-3d-icon {
    height: 48px !important;
    max-width: 58px !important;
    margin: -8px 0 -8px -8px !important;
  }

  .subtab-btn .subtab-count {
    min-width: 24px !important;
    height: 24px !important;
    padding: 0 6px !important;
    margin-left: 2px !important;
    margin-right: -10px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
  }
}

/* Versão Mobile Retrato Explícita via Classe .is-mobile-device / .cgd-mobile-obj */
html.is-mobile-device .tab-btn .tab-btn-text-full,
html.is-mobile-device .tab-btn .tab-btn-text-short,
html.is-mobile-device .subtab-btn .subtab-label,
.main-nav-tabs.cgd-mobile-obj .tab-btn-text-full,
.main-nav-tabs.cgd-mobile-obj .tab-btn-text-short,
.subtabs-nav.cgd-mobile-obj .subtab-label {
  display: none !important;
}

html.is-mobile-device .cgd-manifesto-btn > span:not(.cgd-manifesto-btn-icon),
.cgd-manifesto-actions.cgd-mobile-obj .cgd-manifesto-btn > span:not(.cgd-manifesto-btn-icon) {
  display: inline !important;
}

html.is-mobile-device .main-nav-tabs,
.main-nav-tabs.cgd-mobile-obj {
  gap: 16px !important;
  padding: 0 10px !important;
}

html.is-mobile-device .tab-btn,
.main-nav-tabs.cgd-mobile-obj .tab-btn {
  flex: 1 1 0 !important;
  max-width: 68px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  padding: 0 4px !important;
  gap: 0 !important;
  border-radius: 11px !important;
  justify-content: center !important;
}

html.is-mobile-device .subtabs-nav,
.subtabs-nav.cgd-mobile-obj {
  gap: 18px !important;
  padding: 0 10px !important;
}

html.is-mobile-device .subtab-btn,
.subtabs-nav.cgd-mobile-obj .subtab-btn {
  flex: 1 1 0 !important;
  max-width: 92px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  padding: 0 8px 0 0 !important;
  gap: 5px !important;
  border-radius: 11px !important;
  justify-content: center !important;
}

html.is-mobile-device .cgd-manifesto-btn,
.cgd-manifesto-actions.cgd-mobile-obj .cgd-manifesto-btn {
  height: 38px !important;
  min-height: 38px !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 12px 0 0 !important;
  gap: 6px !important;
  border-radius: 10px !important;
  font-size: 0.94rem !important;
  justify-content: center !important;
}

html.is-mobile-device .cgd-manifesto-btn .cgd-btn-3d-icon,
.cgd-manifesto-actions.cgd-mobile-obj .cgd-manifesto-btn .cgd-btn-3d-icon {
  height: 46px !important;
  max-width: 78px !important;
  margin: -8px 0 -8px -9px !important;
}

html.is-mobile-device .cgd-manifesto-btn .cgd-btn-3d-icon.icon-vote-wide,
.cgd-manifesto-actions.cgd-mobile-obj .cgd-manifesto-btn .cgd-btn-3d-icon.icon-vote-wide {
  height: 47px !important;
  max-width: 84px !important;
  margin: -8px 0 -8px -10px !important;
}

html.is-mobile-device .cgd-manifesto-btn .cgd-btn-3d-icon.icon-ajude-pop,
.cgd-manifesto-actions.cgd-mobile-obj .cgd-manifesto-btn .cgd-btn-3d-icon.icon-ajude-pop {
  height: 48px !important;
  max-width: 68px !important;
  margin: -9px 0 -7px -9px !important;
  transform: translateY(-2px);
}

html.is-mobile-device .cgd-manifesto-btn .cgd-btn-3d-icon.icon-parcerias-wide,
.cgd-manifesto-actions.cgd-mobile-obj .cgd-manifesto-btn .cgd-btn-3d-icon.icon-parcerias-wide {
  height: 46px !important;
  max-width: 68px !important;
  margin: -7px 0 -7px -9px !important;
}

html.is-mobile-device .app-switcher-btn .app-switcher-icon .cgd-btn-3d-icon,
html.is-mobile-device .control-btn .cgd-btn-3d-icon,
.top-bar.cgd-mobile-obj .app-switcher-btn .app-switcher-icon .cgd-btn-3d-icon,
.top-bar.cgd-mobile-obj .control-btn .cgd-btn-3d-icon {
  height: 45px !important;
  max-width: 48px !important;
  margin: -7px 0 -7px -7px !important;
}

html.is-mobile-device .app-switcher-btn .app-switcher-icon .cgd-btn-3d-icon[src*="header_portal"],
.top-bar.cgd-mobile-obj .app-switcher-btn .app-switcher-icon .cgd-btn-3d-icon[src*="header_portal"] {
  height: 48px !important;
  max-width: 52px !important;
  margin: -9px 0 -9px -7px !important;
  transform: translateY(2px) !important;
}

html.is-mobile-device .app-switcher-btn .app-switcher-portal-icon .cgd-btn-3d-icon,
.top-bar.cgd-mobile-obj .app-switcher-btn .app-switcher-portal-icon .cgd-btn-3d-icon {
  height: 48px !important;
  max-width: 52px !important;
  margin: -9px 0 !important;
  transform: translateY(2px) !important;
}

html.is-mobile-device #currentLangFlag .cgd-btn-3d-icon,
.top-bar.cgd-mobile-obj #currentLangFlag .cgd-btn-3d-icon {
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 27px !important;
  margin: -4px 0 -4px -5px !important;
  object-fit: fill !important;
}

html.is-mobile-device .tab-btn .cgd-btn-3d-icon,
.main-nav-tabs.cgd-mobile-obj .tab-btn .cgd-btn-3d-icon {
  height: 48px !important;
  max-width: 58px !important;
  margin: -8px 0 !important;
}

html.is-mobile-device .subtab-btn .cgd-btn-3d-icon,
.subtabs-nav.cgd-mobile-obj .subtab-btn .cgd-btn-3d-icon {
  height: 48px !important;
  max-width: 58px !important;
  margin: -8px 0 -8px -8px !important;
}

/* Estágio B (Telemóvel Horizontal / Landscape <= 540px de altura) para Ícones 3D & Tabs */
@media (orientation: landscape) and (max-height: 540px) {
  .app-switcher-btn .app-switcher-icon .cgd-btn-3d-icon,
  .control-btn .cgd-btn-3d-icon {
    height: 38px !important;
    max-width: 44px !important;
    margin: -7px 0 -7px -6px !important;
  }

  .app-switcher-btn .app-switcher-icon .cgd-btn-3d-icon[src*="header_portal"] {
    height: 41px !important;
    max-width: 48px !important;
    margin: -8px 0 -8px -6px !important;
    transform: translateY(1.5px) !important;
  }

  .app-switcher-btn .app-switcher-portal-icon .cgd-btn-3d-icon {
    height: 41px !important;
    max-width: 48px !important;
    margin: -8px 0 !important;
    transform: translateY(1.5px) !important;
  }

  #currentLangFlag .cgd-btn-3d-icon {
    width: 33px !important;
    min-width: 33px !important;
    max-width: 33px !important;
    height: 24px !important;
    margin: -3px 0 -3px -5px !important;
    object-fit: fill !important;
  }

  .main-nav-tabs,
  .subtabs-nav {
    gap: 22px !important;
  }

  .tab-btn {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 14px 0 0 !important;
  }

  .subtab-btn {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 6px 0 0 !important;
  }

  .tab-btn .cgd-btn-3d-icon,
  .subtab-btn .cgd-btn-3d-icon {
    height: 44px !important;
    max-width: 52px !important;
    margin: -8px 0 -8px -8px !important;
  }
}

html.is-landscape-mobile .app-switcher-btn .app-switcher-icon .cgd-btn-3d-icon,
html.is-landscape-mobile .control-btn .cgd-btn-3d-icon {
  height: 38px !important;
  max-width: 44px !important;
  margin: -7px 0 -7px -6px !important;
}

html.is-landscape-mobile .app-switcher-btn .app-switcher-icon .cgd-btn-3d-icon[src*="header_portal"] {
  height: 41px !important;
  max-width: 48px !important;
  margin: -8px 0 -8px -6px !important;
  transform: translateY(1.5px) !important;
}

html.is-landscape-mobile .app-switcher-btn .app-switcher-portal-icon .cgd-btn-3d-icon {
  height: 41px !important;
  max-width: 48px !important;
  margin: -8px 0 !important;
  transform: translateY(1.5px) !important;
}

html.is-landscape-mobile #currentLangFlag .cgd-btn-3d-icon {
  width: 33px !important;
  min-width: 33px !important;
  max-width: 33px !important;
  height: 24px !important;
  margin: -3px 0 -3px -5px !important;
  object-fit: fill !important;
}

html.is-landscape-mobile .main-nav-tabs,
html.is-landscape-mobile .subtabs-nav {
  gap: 22px !important;
}

html.is-landscape-mobile .tab-btn {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 14px 0 0 !important;
}

html.is-landscape-mobile .subtab-btn {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 6px 0 0 !important;
}

html.is-landscape-mobile .tab-btn .cgd-btn-3d-icon,
html.is-landscape-mobile .subtab-btn .cgd-btn-3d-icon {
  height: 44px !important;
  max-width: 52px !important;
  margin: -8px 0 -8px -8px !important;
}

/* ============================================================================
   REGRA GLOBAL: MARCAS myBOOK, myVOTE E myWALLET NO AZUL ASSINATURA
   ============================================================================ */
.cgd-mybook-brand,
.cgd-myvote-brand,
.cgd-mywallet-brand {
  display: inline;
  white-space: nowrap;
}

.cgd-mybook-brand .brand-my,
.cgd-myvote-brand .brand-my,
.cgd-mywallet-brand .brand-my {
  color: inherit !important;
}

.cgd-mybook-brand .brand-book,
.cgd-myvote-brand .brand-vote,
.cgd-mywallet-brand .brand-wallet {
  color: var(--accent-cyan, #00A3FF) !important;
  font-weight: 800;
}

[data-theme="dark"] .cgd-mybook-brand .brand-book,
[data-theme="dark"] .cgd-myvote-brand .brand-vote,
[data-theme="dark"] .cgd-mywallet-brand .brand-wallet {
  color: var(--cyan-bright, #00A3FF) !important;
}

/* Quando dentro de um botão de tab ativo (fundo azul #3467AB / #2563EB), mantém num azul ciano luminoso de alto contraste */
.tab-btn.active .cgd-mybook-brand .brand-book,
.tab-btn.active .cgd-myvote-brand .brand-vote,
.tab-btn.active .cgd-mywallet-brand .brand-wallet,
[data-theme="dark"] .tab-btn.active .cgd-mybook-brand .brand-book,
[data-theme="dark"] .tab-btn.active .cgd-myvote-brand .brand-vote,
[data-theme="dark"] .tab-btn.active .cgd-mywallet-brand .brand-wallet {
  color: #67E8F9 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}


/* 16.7. Estilos Universais de Tabs e Plugins partilhados entre todos os Livros (Rejuvenescer, Relacionamentos, Próxima Revolução) */
.tab-pane {
  display: none;
  animation: fadeIn 0.22s ease-in-out;
}
.tab-pane.active {
  display: block;
}
.subtab-pane {
  display: none;
  animation: fadeIn 0.22s ease-in-out;
}
.subtab-pane.active {
  display: block;
}

@media (max-width: 440px) {
  .main-nav-tabs {
    gap: 15px !important;
  }

  .subtabs-nav {
    gap: 16px !important;
    justify-content: center !important;
  }
}

@media (max-width: 380px) {
  .main-nav-tabs {
    gap: 14px !important;
  }
  .subtabs-nav {
    gap: 15px !important;
  }
  .cgd-manifesto-btn {
    padding: 0 9px 0 0 !important;
    font-size: 0.86rem !important;
  }
  .cgd-manifesto-btn .cgd-btn-3d-icon {
    height: 44px !important;
    max-width: 72px !important;
    margin: -8px 0 -8px -8px !important;
  }
  .cgd-manifesto-btn .cgd-btn-3d-icon.icon-vote-wide {
    height: 45px !important;
    max-width: 78px !important;
    margin: -8px 0 -8px -9px !important;
  }
  .cgd-manifesto-btn .cgd-btn-3d-icon.icon-ajude-pop {
    height: 46px !important;
    max-width: 62px !important;
    margin: -9px 0 -7px -8px !important;
    transform: translateY(-2px);
  }
  .cgd-manifesto-btn .cgd-btn-3d-icon.icon-parcerias-wide {
    height: 44px !important;
    max-width: 62px !important;
    margin: -7px 0 -7px -8px !important;
  }
  .tab-btn .cgd-btn-3d-icon {
    height: 48px !important;
    max-width: 56px !important;
    margin: -8px 0 !important;
  }
  .btn-composer-cmd .cgd-btn-3d-icon {
    height: 44px !important;
    max-width: 52px !important;
    margin: -7px 0 -7px -7px !important;
  }
  .subtab-btn .cgd-btn-3d-icon {
    height: 48px !important;
    max-width: 56px !important;
    margin: -8px 0 -8px -8px !important;
  }
}

/* ==========================================================================
 * MÓDULO 04: 04_manifesto_typography.css
 * Responsabilidade: Cartão Manifesto Cívico & Projeto Independente (.cgd-manifesto-*)
 * e Norma Editorial de Mancha de Texto, Títulos sem entrelinha e Grupos Coesos.
 * ========================================================================== */

/* ==========================================================================
   11. CARTÃO MANIFESTO CÍVICO & PROJETO INDEPENDENTE (Padrão Carlos Dias)
   Transcrição do draft docs/rascunhos_temps/manifesto.png
   Responsivo para telemóveis, tablets e desktop
   ========================================================================== */
@font-face {
  font-family: 'Fira Sans Condensed Ultra';
  src: url('/assets/fonts/FiraSansCondensed-Ultra.otf') format('opentype'),
       local('Fira Sans Condensed Ultra'),
       local('FiraSansCondensed-Ultra');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

.cgd-manifesto-card {
  background: #F4F8FD;
  border: 2px solid #5BA3DF;
  border-radius: 24px;
  padding: 26px 30px;
  margin: 0 auto 28px;
  max-width: 880px;
  box-shadow: 0 10px 30px rgba(12, 62, 117, 0.10);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  text-align: center;
}

[data-theme="dark"] .cgd-manifesto-card {
  background: #0B1424;
  border-color: rgba(0, 163, 255, 0.45);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(0, 163, 255, 0.12);
}

.cgd-manifesto-title {
  font-family: 'Fira Sans Condensed Ultra', 'Fira Sans Condensed', sans-serif !important;
  font-weight: 900 !important;
  font-size: clamp(2.2rem, 6.2vw, 4.35rem);
  letter-spacing: 0.01em;
  line-height: 0.96;
  color: #032B69;
  margin: 0 0 10px 0;
  text-transform: uppercase;
  text-align: center;
  width: 100%;
  display: block;
}

[data-theme="dark"] .cgd-manifesto-title {
  color: #38BDF8;
}

.cgd-manifesto-sub1 {
  font-size: 1.05rem;
  font-weight: 500;
  color: #335372;
  margin: 0 0 3px 0;
  line-height: 1.4;
}

[data-theme="dark"] .cgd-manifesto-sub1 {
  color: #94A3B8;
}

.cgd-manifesto-sub2 {
  font-size: 1.05rem;
  line-height: 1.4;
  margin: 0 0 16px 0;
  color: #1E293B;
}

[data-theme="dark"] .cgd-manifesto-sub2 {
  color: #F1F5F9;
}

.cgd-manifesto-sub2 .sub2-highlight {
  color: #0284C7;
  font-weight: 800;
}

[data-theme="dark"] .cgd-manifesto-sub2 .sub2-highlight {
  color: #38BDF8;
}

.cgd-manifesto-sub2 .sub2-names {
  font-weight: 800;
  color: #0A2B4E;
}

[data-theme="dark"] .cgd-manifesto-sub2 .sub2-names {
  color: #FFFFFF;
}

.cgd-manifesto-p {
  font-size: 0.96rem;
  line-height: 1.6;
  color: #273849;
  margin: 0 0 12px 0;
}

[data-theme="dark"] .cgd-manifesto-p {
  color: #CBD5E1;
}

.cgd-manifesto-p strong {
  font-weight: 800;
  color: #0A2B4E;
}

[data-theme="dark"] .cgd-manifesto-p strong {
  color: #FFFFFF;
}

.cgd-manifesto-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 18px;
  margin-top: 14px;
  padding: 0 6px;
  box-sizing: border-box;
}

.cgd-manifesto-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  min-width: 0;
}

.cgd-manifesto-btn {
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  min-height: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 15px 0 0 !important;
  background: #BEDBFF;
  border: 1.5px solid #B6C6DB;
  border-radius: 10px;
  color: #1C3E74;
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(12, 62, 117, 0.08);
  box-sizing: border-box;
  white-space: nowrap;
  position: relative;
  overflow: visible !important;
}

.cgd-manifesto-btn:hover {
  background: #D0E6FF;
  border-color: #93ACC8;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(12, 62, 117, 0.14);
}

[data-theme="dark"] .cgd-manifesto-btn {
  background: rgba(30, 58, 138, 0.45);
  border: 1.5px solid #64748B;
  border-radius: 10px;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .cgd-manifesto-btn:hover {
  background: rgba(37, 99, 235, 0.55);
  border-color: #94A3B8;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 163, 255, 0.25);
}

.cgd-manifesto-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  position: relative;
  overflow: visible !important;
}

.cgd-manifesto-btn-caption {
  display: block;
  width: auto;
  max-width: 100%;
  font-size: 0.77rem;
  font-weight: 600;
  color: #385878;
  margin: 4px auto 0 auto;
  line-height: 1.2;
  text-align: center;
}

[data-theme="dark"] .cgd-manifesto-btn-caption {
  color: #94A3B8;
  font-weight: 500;
}

/* Responsividade Mobile-First do Cartão Manifesto */
@media (max-width: 820px) {
  .cgd-manifesto-card {
    padding: 20px 16px;
    border-radius: 18px;
    margin-bottom: 22px;
  }
  .cgd-manifesto-title {
    font-size: clamp(1.95rem, 8.2vw, 2.8rem);
    line-height: 1.02;
  }
  .cgd-manifesto-sub1,
  .cgd-manifesto-sub2 {
    font-size: 0.94rem;
  }
  .cgd-manifesto-p {
    font-size: 0.9rem;
    line-height: 1.55;
  }
  .cgd-manifesto-actions {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 16px;
    margin-top: 14px;
    padding: 0 4px;
  }
  .cgd-manifesto-btn {
    height: 38px;
    min-height: 38px;
    padding: 0 12px 0 0;
    font-size: 0.94rem;
    gap: 6px;
  }
  .cgd-manifesto-btn-caption {
    font-size: 0.78rem;
  }
}

html.is-mobile-device .cgd-manifesto-title {
  font-size: 1.95rem !important;
  line-height: 1.02 !important;
}

html.is-mobile-device .cgd-manifesto-sub1,
html.is-mobile-device .cgd-manifesto-sub2 {
  font-size: 0.94rem !important;
}

html.is-mobile-device .cgd-manifesto-p {
  font-size: 0.96rem !important;
  line-height: 1.38 !important;
}

html.is-mobile-device .cgd-manifesto-actions,
.cgd-manifesto-actions.cgd-mobile-obj {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px 16px !important;
  margin-top: 14px !important;
  padding: 0 4px !important;
}

@media (max-width: 380px) {
  .cgd-manifesto-title {
    font-size: 1.75rem;
  }
  .cgd-manifesto-btn {
    font-size: 0.86rem;
    padding: 0 9px 0 0;
  }
  .cgd-manifesto-btn-caption {
    font-size: 0.68rem;
  }
}


/* ==========================================================================
   14. NORMA EDITORIAL DE MANCHA DE TEXTO, TÍTULOS E GRUPOS COESOS (PADRÃO CARLOS DIAS)
   Baseado no modelo Photoshop da página inicial Rejuvenescer:
   - Mancha de texto nas text boxes: padding 10px 14px (apenas o espaço essencial).
   - Títulos e subtítulos: line-height compacto (0.95 a 1.08), sem entrelinhas largas
     quando têm mais de uma linha.
   - Grupo Título/Subtítulo + Texto: quase colados (margin-bottom: 1px a 2px), formando
     um bloco visual único.
   - Espaço vertical (12px a 14px) APENAS quando há mudança de assunto / novo bloco.
   ========================================================================== */
:root {
  --cgd-gap-15mm: 6px;
  --cgd-box-pad-y: 8px;
  --cgd-box-pad-x: 10px;
  --cgd-title-lh: 0.96;
  --cgd-sub-lh: 1.06;
  --cgd-group-gap: 2px;
  --cgd-topic-gap: 8px;
}

/* 14.0. Compactação Geral de Espaçamentos Verticais (1.5mm = 6px entre blocos) & Maior Densidade de Fotos/Texto */
.hero {
  padding: 0 !important;
  margin: 0 !important;
}

.hero-intro-card,
.hero-content-card,
.cgd-manifesto-card,
.role-bar,
.book-duo-showcase,
.book-single-showcase,
.hero-diagram-card,
.quote-section,
.waitlist-section,
.resource-allocation-banner,
.living-engine-banner,
.guest-warning-banner,
.authors-unified-card,
.active-account-card,
.reg-form-card {
  margin-top: 0 !important;
  margin-bottom: var(--cgd-gap-15mm, 6px) !important;
}

.services-grid,
.chapters-grid,
.specs-grid,
.pillars-grid,
.help-grid,
.partner-grid,
.projects-grid,
.kpi-grid,
.plugins-grid,
.tiers-grid {
  gap: 8px !important;
  margin-top: 0 !important;
  margin-bottom: var(--cgd-gap-15mm, 6px) !important;
}

.card-duo-showcase {
  gap: 2px !important;
  padding: 0 !important;
  background: #060D1A !important;
}

.card-duo-item {
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  position: relative !important;
}

.card-duo-item .card-zoom-btn-back,
.book-duo-item .card-zoom-btn-back {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  z-index: 12 !important;
}

.service-card .card-top {
  margin-bottom: 2px !important;
  min-height: 28px !important;
}

.hero-top-art {
  padding: 6px !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
}

.hero-top-art img,
.hero-top-art .book-cover-img {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 440px !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  display: block !important;
}

@media (max-width: 820px) {
  .hero-intro-card {
    grid-template-columns: 1fr !important;
  }
  .hero-top-art {
    border-left: none !important;
    border-top: 1px solid var(--border-card) !important;
    padding: 8px 6px !important;
    max-height: none !important;
    height: auto !important;
  }
  .hero-top-art img,
  .hero-top-art .book-cover-img {
    width: 100% !important;
    max-width: 310px !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
  }
  .specs-grid,
  .pillars-grid,
  .chapters-grid {
    grid-template-columns: 1fr !important;
  }
  .pillar-card-wide {
    grid-column: span 1 !important;
  }
}

html.is-mobile-device .hero-intro-card {
  grid-template-columns: 1fr !important;
}

html.is-mobile-device .hero-top-art {
  border-left: none !important;
  border-top: 1px solid var(--border-card) !important;
  padding: 8px 6px !important;
  max-height: none !important;
  height: auto !important;
}

html.is-mobile-device .hero-top-art img,
html.is-mobile-device .hero-top-art .book-cover-img {
  width: 100% !important;
  max-width: 310px !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
}

html.is-mobile-device .specs-grid,
html.is-mobile-device .pillars-grid,
html.is-mobile-device .chapters-grid {
  grid-template-columns: 1fr !important;
}

html.is-mobile-device .pillar-card-wide {
  grid-column: span 1 !important;
}

.chapter-art-corner {
  padding: 4px !important;
}

/* 14.1. Mancha Interna Compacta em Todas as Text Boxes do Ecossistema */
.hero-top-text {
  padding: var(--cgd-box-pad-y, 8px) var(--cgd-box-pad-x, 10px) !important;
  justify-content: flex-start !important;
}

.hero-content-card {
  padding: var(--cgd-box-pad-y, 8px) var(--cgd-box-pad-x, 10px) !important;
}

.cgd-manifesto-card {
  padding: 9px 11px !important;
  margin-bottom: var(--cgd-gap-15mm, 6px) !important;
  border-radius: 14px !important;
}

.pillar-card,
.spec-card,
.quote-section,
.waitlist-section,
.help-card,
.partner-card,
.partner-form-section,
.project-card,
.kpi-card,
.resource-allocation-banner,
.app-calc-box,
.living-engine-banner,
.guest-warning-banner,
.authors-unified-card {
  padding: var(--cgd-box-pad-y, 8px) var(--cgd-box-pad-x, 10px) !important;
}

.chapter-card-header-titles {
  padding: 6px 10px !important;
}

.chapter-body {
  padding: 8px 10px !important;
}

.service-card .card-content {
  padding: 8px 10px 4px !important;
}

.plugin-body-content {
  padding: 9px 10px 8px !important;
}

/* 14.2. Títulos e Subtítulos Sem Entrelinha (Linhas Juntas) e Colados ao Texto Seguinte */
h1, .hero-intro-card h1, .hero-top-text h1, .title-main, .cgd-manifesto-title, .main-title, .help-hero h1, .partner-hero h1 {
  line-height: 0.96 !important;
  margin-top: 0 !important;
  margin-bottom: 2px !important;
}

h2, h3, h4,
.hero-sub,
.hero-punch,
.section-title h2,
.pillar-card h3,
.service-card h2,
.chapter-title,
.tier-name,
.tier-subtitle,
.help-card-title,
.partner-card-title,
.partner-form-title,
.project-title,
.allocation-title,
.living-engine-title,
.guest-warning-title,
.author-entry h3 {
  line-height: 1.06 !important;
  margin-top: 0 !important;
  margin-bottom: 2px !important;
}

.plugin-title-box h3,
.plugin-game-title,
.post-title-text {
  line-height: 1.15 !important;
  padding-top: 2px !important;
  margin-top: 0 !important;
  margin-bottom: 3px !important;
}

/* Autoria colada ao título H1, com espaço de mudança de assunto apenas depois dela */
.hero-author-credit {
  line-height: 1.12 !important;
  margin-top: 1px !important;
  margin-bottom: 6px !important;
}

/* Subtítulos de secção colados ao título H2 */
.section-title,
.help-hero,
.partner-hero,
.reg-hero {
  margin-top: 0 !important;
  margin-bottom: 8px !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
}

.slogan-postit {
  margin-top: 0 !important;
  margin-bottom: 6px !important;
}

.section-title p,
.help-hero p,
.partner-hero p,
.main-subtitle {
  line-height: 1.32 !important;
  margin-top: 2px !important;
  margin-bottom: 0 !important;
}

/* Subtítulos e cargos nos cartões colados ao título e ao texto do grupo */
.chapter-num-pill,
.pillar-num,
.help-card-tag,
.partner-card-tag {
  line-height: 1.05 !important;
  margin-bottom: 2px !important;
}

.chapter-sub,
.author-role,
.tier-price-sub {
  line-height: 1.12 !important;
  margin-top: 0 !important;
  margin-bottom: 2px !important;
}

/* 14.3. Hero Punch e Subtítulos no Hero Card (Modelo Photoshop Rejuvenescer) */
.hero-punch {
  margin: 0 0 2px 0 !important;
  padding: 0 !important;
  border-bottom: none !important;
  line-height: 1.06 !important;
}

.hero-divider {
  display: none !important;
}

.hero-portugal-row {
  margin-top: 8px !important;
  gap: 10px !important;
  align-items: center !important;
}

.hero-portugal-text .hero-sub {
  margin-bottom: 2px !important;
}

/* Frase de fecho destacada (Fira Sans Condensed Bold, centrada, espaço de mudança de assunto antes) */
.hero-close {
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif !important;
  font-size: clamp(1.22rem, 2.3vw, 1.52rem) !important;
  font-weight: 800 !important;
  line-height: 1.06 !important;
  margin-top: 8px !important;
  margin-bottom: 0 !important;
  color: var(--accent-cyan, #0284C7) !important;
  text-align: center !important;
}

html.is-mobile-device .hero-close {
  font-size: 1.24rem !important;
}

/* Impede que unidades vw dentro de clamp() sejam multiplicadas duas vezes quando window.innerWidth = 980px + zoom 2.5 */
html.is-mobile-device .hero-intro-card h1,
html.is-mobile-device .hero-top-text h1 {
  font-size: 2.15rem !important;
}

html.is-mobile-device .title-main {
  font-size: 1.75rem !important;
}

html.is-mobile-device .hero-sub,
html.is-mobile-device .hero-punch {
  font-size: 1.14rem !important;
}

html.is-mobile-device .slogan-postit {
  font-size: 0.84rem !important;
}

/* 14.4. Texto de Corpo Ligeiramente Maior, Mais Legível e Compacto */
.hero-lead,
.service-card p,
.pillar-card p,
.chapter-teaser,
.tier-box p,
.help-card-body,
.help-card-body p,
.partner-card-body,
.partner-card-body p,
.project-subtitle,
.cgd-manifesto-p,
.author-entry p,
.living-engine-desc,
.guest-warning-text,
.plugin-lead-text,
.post-body-text {
  font-size: clamp(0.96rem, 1.65vw, 1.04rem) !important;
  line-height: 1.35 !important;
  margin-top: 0 !important;
}

html.is-mobile-device .hero-lead,
html.is-mobile-device .service-card p,
html.is-mobile-device .pillar-card p,
html.is-mobile-device .chapter-teaser,
html.is-mobile-device .tier-box p,
html.is-mobile-device .help-card-body,
html.is-mobile-device .help-card-body p,
html.is-mobile-device .partner-card-body,
html.is-mobile-device .partner-card-body p,
html.is-mobile-device .project-subtitle,
html.is-mobile-device .cgd-manifesto-p,
html.is-mobile-device .author-entry p,
html.is-mobile-device .living-engine-desc,
html.is-mobile-device .guest-warning-text,
html.is-mobile-device .plugin-lead-text,
html.is-mobile-device .post-body-text {
  font-size: 0.96rem !important;
}

/* Parágrafos consecutivos (mudança de assunto) têm espaço de separação compacto (~1.5mm) */
.hero-lead + .hero-lead,
.cgd-manifesto-p + .cgd-manifesto-p,
.help-card-body p + p,
.partner-card-body p + p,
.service-card p + p {
  margin-top: 6px !important;
}

/* Manifesto Cívico: subtítulos juntos ao título e parágrafos agrupados */
.cgd-manifesto-sub1 {
  line-height: 1.12 !important;
  margin: 0 0 1px 0 !important;
}

.cgd-manifesto-sub2 {
  line-height: 1.12 !important;
  margin: 0 0 6px 0 !important;
}

.cgd-manifesto-p {
  margin-bottom: 0 !important;
}

/* EXCEÇÃO ESTÉTICA DOCUMENTADA (Padrão Carlos Dias):
   Nos botões do Manifesto Cívico, a legenda (.cgd-manifesto-btn-caption) fica a 0mm da ponta inferior
   dos ícones 3D (margin-top: 3px relativamente à base do botão de 36px), para que a sombra suave
   dos ícones 3D se projete ligeiramente sobre o topo do texto sem que a imagem o tape.
   A regra geral de >= 1.2mm aplica-se onde a falta de contraste entre imagem e texto prejudique a leitura. */
.cgd-manifesto-actions {
  margin-top: 12px !important;
  gap: 14px 18px !important;
}

.cgd-manifesto-btn-caption {
  margin: 4px auto 0 auto !important;
  line-height: 1.2 !important;
}


.role-desc-link {
  color: var(--accent-cyan, #00A3FF);
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  text-decoration: underline;
  cursor: pointer;
}
.role-desc-link:hover {
  opacity: 0.85;
}

/* ==========================================================================
   15. BARRA DE NAVEGAÇÃO RÁPIDA INTELIGENTE & RESUMOS EXPANSÍVEIS (UX ULTRA-SIMPLES)
   ========================================================================== */
.cgd-smart-nav-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-card-elevated, var(--bg-card));
  border: 1.5px solid var(--accent-cyan, #0284C7);
  border-radius: 14px;
  padding: 8px 12px !important;
  margin: 0 auto 8px auto !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.10);
  width: 100%;
  box-sizing: border-box;
}

.cgd-smart-nav-label {
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--accent-cyan, #0284C7);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 4px;
  white-space: nowrap;
}

.cgd-smart-nav-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 9px 10px;
}

.cgd-smart-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.28);
  color: var(--text-card-title, #0F172A);
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1.15;
}

:root[data-theme="dark"] .cgd-smart-pill {
  background: rgba(0, 163, 255, 0.12);
  border-color: rgba(0, 163, 255, 0.35);
  color: #F8FAFC;
}

.cgd-smart-pill:hover {
  background: var(--accent-cyan, #0284C7);
  border-color: var(--accent-cyan, #0284C7);
  color: #FFFFFF !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.25);
}

.cgd-smart-pill.pill-accent {
  background: linear-gradient(135deg, #0284C7, #00A3FF);
  border-color: transparent;
  color: #FFFFFF !important;
  font-weight: 800;
}

.cgd-smart-details {
  width: 100%;
  margin: 6px auto !important;
  background: var(--bg-card);
  border: 1px dashed var(--border-card);
  border-radius: 12px;
  padding: 6px 12px !important;
  box-sizing: border-box;
}

.cgd-smart-details > summary {
  cursor: pointer;
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.90rem;
  font-weight: 800;
  color: var(--accent-cyan, #0284C7);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 3px 0;
  user-select: none;
}

.cgd-smart-details > summary::-webkit-details-marker {
  display: none;
}

.cgd-smart-details > summary::after {
  content: '▼';
  font-size: 0.72rem;
  transition: transform 0.2s ease;
}

.cgd-smart-details[open] > summary::after {
  transform: rotate(180deg);
}

.cgd-smart-details-body {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-card);
}

/* ==========================================================================
   16. TABELA COMPARATIVA DE PLANOS POR LIVRO (PARTILHADA POR TODOS OS LIVROS)
   ========================================================================== */
.services-tiers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 14px;
  row-gap: 28px;
  margin: 14px auto 18px;
  width: 100%;
  max-width: 880px;
}

@media (max-width: 760px) {
  .services-tiers-grid {
    grid-template-columns: 1fr !important;
  }
}

html.is-mobile-device .services-tiers-grid {
  grid-template-columns: 1fr !important;
}

.tier-box {
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  border-radius: var(--card-radius, 14px);
  padding: 20px 14px 28px !important;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  position: relative;
}

.tier-box.highlight {
  border-color: var(--accent-cyan, #0284C7);
  box-shadow: 0 10px 32px rgba(2, 132, 199, 0.2);
}

.tier-badge-top {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #D97706;
  color: #FFFFFF;
  padding: 3px 14px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  z-index: 2;
}

.tier-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 1.22rem;
  font-weight: 900;
  color: var(--text-card-title);
  margin-top: 2px !important;
  margin-bottom: 4px !important;
  line-height: 1.15;
}

.tier-name > span[data-i18n="tier_avail"],
.tier-name > span[data-i18n="tier_unavail"] {
  margin-left: 0 !important;
  line-height: 1.1;
}

.tier-price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 2px;
  margin-bottom: 4px;
}

.tier-price-val {
  font-size: 1.68rem;
  font-weight: 900;
  color: var(--accent-cyan, #0284C7);
  letter-spacing: -0.02em;
  line-height: 1;
}

.tier-price-period {
  font-size: 0.85rem;
  color: var(--text-page-muted);
  font-weight: 600;
  line-height: 1;
  transform: translateY(-1px);
}

.tier-price-sub {
  font-size: 0.82rem;
  color: var(--accent-cyan, #0284C7);
  font-weight: 800;
  margin-bottom: 4px !important;
  line-height: 1.2;
  text-align: center;
}

.tier-subtitle {
  font-size: 0.88rem;
  color: var(--text-card-title);
  font-weight: 800;
  margin-bottom: 4px !important;
  line-height: 1.25;
  text-align: center;
}

.tier-features {
  list-style: none;
  margin: 0 0 8px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.tier-features li {
  font-size: 0.88rem;
  color: var(--text-card-body);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.38;
}

.tier-features .feature-icon {
  flex-shrink: 0;
  width: 1.35em;
  text-align: center;
  line-height: 1.35;
  font-size: 0.95rem;
  user-select: none;
}

.tier-features .feature-text {
  flex: 1;
  min-width: 0;
}

.tier-features li.tier-feature-vote {
  background: rgba(0, 0, 0, 0.035);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 6px 10px;
  margin: 2px 0 0 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

:root[data-theme="dark"] .tier-features li.tier-feature-vote {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.living-engine-banner {
  background: var(--bg-card-elevated, var(--bg-card));
  border: 1px solid var(--accent-cyan, #0284C7);
  border-radius: var(--card-radius, 14px);
  padding: 12px 16px;
  margin: 8px auto 14px auto;
  max-width: 880px;
  width: 100%;
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  box-sizing: border-box;
}

.living-engine-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.living-engine-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-cyan, #0284C7);
  color: #FFFFFF;
  padding: 3px 12px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.living-engine-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-card-title);
  margin: 0;
}

.living-engine-desc {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-card-body);
  margin: 0;
}

.living-engine-notice {
  font-size: 0.78rem;
  color: var(--text-page-muted);
  border-top: 1px dashed var(--border-card);
  padding-top: 5px;
  margin-top: 2px;
  font-style: italic;
}

.btn-tier {
  width: 100%;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--gradient-brand, linear-gradient(135deg, #0284C7, #00A3FF));
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.2s;
  box-sizing: border-box;
}

.tier-box > .btn-tier {
  width: calc(100% - 28px);
  position: absolute;
  bottom: -19px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.22);
}

.tier-box > .btn-tier:hover {
  transform: translateX(-50%);
}

.tier-box > .btn-tier:disabled,
.tier-box > .btn-tier:disabled:hover,
.btn-tier:disabled,
.btn-tier:disabled:hover {
  background: var(--bg-card) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-weight: 800 !important;
  opacity: 1 !important;
  transition: none !important;
  cursor: not-allowed !important;
}

.tier-box > .btn-tier:disabled,
.tier-box > .btn-tier:disabled:hover {
  transform: translateX(-50%) !important;
}

.btn-tier:hover {
  opacity: 0.92;
}

/* ==========================================================================
   13. SHOWCASE DE CAPA & CONTRACAPA (2 Cartões Desktop / 1 Cartão 3D Flip Mobile)
   Partilhado por /rejuve, /dating e /revolution
   ========================================================================== */
.book-duo-showcase,
.book-single-showcase {
  display: flex;
  flex-direction: column;
  margin: 0 auto 16px;
  width: 100%;
  max-width: 880px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius, 14px);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
}

.book-duo-showcase .card-zoom-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 12;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(9, 44, 88, 0.92);
  border: 1.5px solid rgba(255, 240, 75, 0.78);
  color: #FFF04B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: all 0.22s ease;
  padding: 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.book-duo-showcase .card-zoom-btn:hover {
  background: #0F407B;
  border-color: #FFF04B;
  color: #FFFFFF;
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.book-duo-showcase .card-zoom-icon {
  width: 21px;
  height: 21px;
  display: block;
  stroke: currentColor;
  transition: transform 0.22s ease;
}

.book-duo-showcase.is-zoomed .card-zoom-btn {
  background: #FFF04B;
  border-color: #092C58;
  color: #092C58;
  top: 5px;
  left: 8px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.book-duo-showcase.is-zoomed .card-zoom-icon .zoom-plus-v {
  display: none;
}

.book-duo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
  background: #060D1A;
}

.book-duo-item {
  background: #060D1A;
  border: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s ease;
}

.book-duo-item:hover {
  transform: none;
  box-shadow: none;
}

.book-duo-showcase.is-zoomed .book-duo-grid {
  display: none;
}

.book-flip-topbar {
  width: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px 11px 48px;
  background: linear-gradient(90deg, #092C58 0%, #0F407B 50%, #092C58 100%);
  color: #FFFFFF;
  border: none;
  border-bottom: 1.5px solid rgba(255, 240, 75, 0.45);
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: all 0.22s ease;
  line-height: 1.2;
  z-index: 6;
  box-sizing: border-box;
}

.book-duo-showcase.is-zoomed .book-flip-topbar {
  display: flex;
}

.book-flip-topbar:hover {
  background: linear-gradient(90deg, #0C386E 0%, #15539E 50%, #0C386E 100%);
  color: #FFF04B;
}

:root[data-theme="dark"] .book-flip-topbar {
  background: linear-gradient(90deg, #0D192E 0%, #16294A 50%, #0D192E 100%);
  border-bottom-color: rgba(56, 189, 248, 0.4);
  color: #E2F1FF;
}

:root[data-theme="dark"] .book-flip-topbar:hover {
  background: linear-gradient(90deg, #132442 0%, #1E3A68 50%, #132442 100%);
  color: #FFF04B;
}

.book-flip-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex-shrink: 0;
  color: #FFF04B;
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.book-flip-topbar:hover .book-flip-icon {
  transform: rotate(35deg) scale(1.12);
}

.book-duo-showcase.is-flipped .book-flip-icon,
.book-single-showcase.is-flipped .book-flip-icon {
  transform: rotate(180deg);
}

.book-duo-showcase.is-flipped .book-flip-topbar:hover .book-flip-icon,
.book-single-showcase.is-flipped .book-flip-topbar:hover .book-flip-icon {
  transform: rotate(215deg) scale(1.12);
}

.book-flip-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 240, 75, 0.16);
  border: 1px solid rgba(255, 240, 75, 0.5);
  color: #FFF04B;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-left: 2px;
}

.book-cover-stage {
  width: 100%;
  aspect-ratio: 1200 / 1855;
  perspective: 1400px;
  position: relative;
  background: #060D1A;
  display: none;
  cursor: pointer;
}

.book-duo-showcase.is-zoomed .book-cover-stage {
  display: block;
}

@media (max-width: 820px) {
  .book-duo-grid {
    gap: 2px;
    padding: 0;
  }
  .book-duo-showcase:not([data-user-zoom-toggled="true"]) .book-duo-grid {
    display: none;
  }
  .book-duo-showcase:not([data-user-zoom-toggled="true"]) .book-flip-topbar {
    display: flex;
  }
  .book-duo-showcase:not([data-user-zoom-toggled="true"]) .book-cover-stage {
    display: block;
  }
  .book-duo-showcase:not([data-user-zoom-toggled="true"]) .card-zoom-btn {
    background: #FFF04B;
    border-color: #092C58;
    color: #092C58;
    top: 5px;
    left: 8px;
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }
  .book-duo-showcase:not([data-user-zoom-toggled="true"]) .card-zoom-icon .zoom-plus-v {
    display: none;
  }
}

html.is-mobile-device .book-duo-showcase:not([data-user-zoom-toggled="true"]) .book-duo-grid,
.book-duo-showcase.cgd-mobile-obj:not([data-user-zoom-toggled="true"]) .book-duo-grid {
  display: none;
}
html.is-mobile-device .book-duo-showcase:not([data-user-zoom-toggled="true"]) .book-flip-topbar,
.book-duo-showcase.cgd-mobile-obj:not([data-user-zoom-toggled="true"]) .book-flip-topbar {
  display: flex;
}
html.is-mobile-device .book-duo-showcase:not([data-user-zoom-toggled="true"]) .book-cover-stage,
.book-duo-showcase.cgd-mobile-obj:not([data-user-zoom-toggled="true"]) .book-cover-stage {
  display: block;
}
html.is-mobile-device .book-duo-showcase:not([data-user-zoom-toggled="true"]) .card-zoom-btn,
.book-duo-showcase.cgd-mobile-obj:not([data-user-zoom-toggled="true"]) .card-zoom-btn {
  background: #FFF04B;
  border-color: #092C58;
  color: #092C58;
  top: 5px;
  left: 8px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
html.is-mobile-device .book-duo-showcase:not([data-user-zoom-toggled="true"]) .card-zoom-icon .zoom-plus-v,
.book-duo-showcase.cgd-mobile-obj:not([data-user-zoom-toggled="true"]) .card-zoom-icon .zoom-plus-v {
  display: none;
}

.book-cover-flipper {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.68s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.book-duo-showcase.is-flipped .book-cover-flipper,
.book-single-showcase.is-flipped .book-cover-flipper {
  transform: rotateY(180deg);
}

.book-cover-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.book-cover-back {
  transform: rotateY(180deg);
}

.book-duo-showcase .book-cover-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1200 / 1855;
  object-fit: cover;
  display: block;
  border-radius: 0;
  transition: transform 0.35s ease;
}

.book-cover-stage:hover .book-cover-img {
  transform: scale(1.012);
}

/* ==========================================================================
   14. FORMULÁRIOS DE DESCARREGAMENTO PERIÓDICO & DADOS PESSOAIS NA APP
   Partilhado por /rejuve, /dating e /revolution
   ========================================================================== */
.personalized-builder-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-card, rgba(0, 163, 255, 0.2));
}

.pbook-tier-pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #059669;
  margin-bottom: 10px;
}

[data-theme="dark"] .pbook-tier-pill {
  color: #34D399;
  background: rgba(16, 185, 129, 0.18);
}

.eu-germany-gdpr-box {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.94) 0%, rgba(15, 23, 42, 0.96) 100%);
  border: 2px solid #10B981;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.18);
  color: #F8FAFC;
  text-align: left;
}

[data-theme="light"] .eu-germany-gdpr-box {
  background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF4 100%);
  border: 2px solid #059669;
  color: #0F172A;
  box-shadow: 0 10px 26px rgba(5, 150, 105, 0.12);
}

.eu-germany-gdpr-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.eu-germany-flag-shield {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  flex-shrink: 0;
}

.eu-germany-flag-shield img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.eu-germany-kicker {
  display: block;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #34D399;
  margin-bottom: 3px;
}

[data-theme="light"] .eu-germany-kicker {
  color: #047857;
}

.eu-germany-title-wrap h3 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.25;
  color: inherit;
}

.eu-germany-gdpr-body {
  font-size: 0.93rem;
  line-height: 1.55;
  margin: 0 0 10px 0;
  color: inherit;
}

.eu-germany-gdpr-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
  gap: 8px;
  margin-top: 12px;
}

.eu-gdpr-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #A7F3D0;
}

[data-theme="light"] .eu-gdpr-pill {
  background: #D1FAE5;
  border-color: #059669;
  color: #065F46;
}

.pbook-role-gate-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--bg-card, #1E293B);
  border: 1px solid var(--border-card, rgba(0, 163, 255, 0.28));
  margin-bottom: 18px;
  text-align: left;
}

.pbook-gate-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 240px;
}

.pbook-gate-icon {
  font-size: 1.35rem;
  line-height: 1.2;
}

.pbook-gate-left strong {
  display: block;
  font-size: 0.96rem;
  color: var(--text-card-title);
  margin-bottom: 3px;
}

.pbook-gate-left p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-card-body);
}

.pbook-btn-sample {
  width: auto !important;
  padding: 10px 18px !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  background: var(--accent-cyan, #00A3FF) !important;
  color: #000000 !important;
  border: 1px solid var(--accent-cyan, #00A3FF) !important;
  border-radius: 10px !important;
  cursor: pointer;
}

.pbook-clinical-form {
  background: var(--bg-card, #0F172A);
  border: 1px solid var(--border-card, rgba(0, 163, 255, 0.25));
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  text-align: left;
}

.pbook-form-legend-bar {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid #EF4444;
  font-size: 0.88rem;
  color: var(--text-card-title);
  margin-bottom: 18px;
}

.req-star {
  color: #EF4444 !important;
  font-weight: 900;
  font-size: 1.08em;
  margin-left: 2px;
}

.pbook-fieldset {
  border: 1px solid var(--border-card, rgba(148, 163, 184, 0.25));
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 18px 0;
}

.pbook-fieldset legend {
  padding: 0 12px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-cyan, #00A3FF);
  text-align: center;
  margin: 0 auto;
}

[data-theme="light"] .pbook-fieldset legend {
  color: #0369A1;
}

.pbook-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.pbook-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pbook-field-wide {
  grid-column: 1 / -1;
}

.pbook-field label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-card-title);
  line-height: 1.3;
}

.pbook-field input,
.pbook-field select {
  height: 42px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--border-card, rgba(148, 163, 184, 0.38));
  background: var(--bg-page, #0B1120);
  color: var(--text-card-title, #F8FAFC);
  font-size: 0.92rem;
  font-family: inherit;
}

[data-theme="light"] .pbook-field input,
[data-theme="light"] .pbook-field select {
  background: #FFFFFF;
  color: #0F172A;
  border-color: #CBD5E1;
}

.pbook-consent-box {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.09);
  border: 1px solid rgba(16, 185, 129, 0.38);
  margin-bottom: 18px;
}

.pbook-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  line-height: 1.48;
  color: var(--text-card-title);
  cursor: pointer;
}

.pbook-consent-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #10B981;
  flex-shrink: 0;
}

.pbook-submit-row {
  display: flex;
  justify-content: center;
}

.pbook-btn-submit {
  max-width: 560px;
  width: 100%;
  padding: 13px 22px !important;
  font-size: 0.98rem !important;
  font-weight: 900 !important;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.28);
}

.pbook-status-msg {
  margin-top: 12px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
}

/* Cartão de Descarregamento Periódico na App */
.app-download-card {
  background: var(--bg-card, #0F172A);
  border: 1.5px solid var(--accent-cyan, #00A3FF);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 0 auto 22px auto;
  max-width: 880px;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.12);
  text-align: left;
  box-sizing: border-box;
}

.app-plan-summary-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.32);
  margin: 0 auto 18px auto;
  max-width: 880px;
  box-sizing: border-box;
  text-align: center;
}

.tabs-role-bridge .role-bar {
  background: #DEE5F0 !important;
  color: #0A2540 !important;
  border: 1.5px solid #93ACC8 !important;
  border-radius: 12px !important;
  padding: 11px 16px !important;
  margin: 0 auto !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
  box-sizing: border-box !important;
}

[data-theme="dark"] .tabs-role-bridge .role-bar,
:root[data-theme="dark"] .tabs-role-bridge .role-bar {
  background: #1A2438 !important;
  color: #F8FAFC !important;
  border-color: #64748B !important;
}

.role-bar.role-bar-guest-alert,
.tabs-role-bridge .role-bar.role-bar-guest-alert {
  background: #DEE5F0 !important;
  color: #0A2540 !important;
  border: 2px solid #DC2626 !important;
  border-style: solid !important;
  border-radius: 12px !important;
  padding: 11px 16px !important;
  margin: 0 auto !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
  box-sizing: border-box !important;
}

:root[data-theme="dark"] .role-bar.role-bar-guest-alert,
[data-theme="dark"] .role-bar.role-bar-guest-alert,
[data-theme="dark"] .tabs-role-bridge .role-bar.role-bar-guest-alert {
  background: #1A2438 !important;
  color: #F8FAFC !important;
  border-color: #EF4444 !important;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.20) !important;
}

.role-bar.role-bar-guest-alert .role-badge {
  background: #DC2626 !important;
  color: #FFFFFF !important;
}

.app-download-header {
  text-align: center !important;
}

.app-download-badge {
  display: inline-block;
  margin: 0 auto 8px auto;
  text-align: center;
}

.pbook-edition-dd-item:hover:not(:disabled) {
  background: var(--menu-item-hover, rgba(56, 189, 248, 0.15)) !important;
}

.pbook-edition-dd-item:disabled {
  opacity: 0.48 !important;
  cursor: not-allowed !important;
}

/* ==========================================================================
   17. SECÇÃO COMPACTA "SOBRE OS AUTORES" & AVATAR CIRCULAR COM ANEL AZUL
   (Padrão Carlos Dias — Transcrição Fiel dos Drafts Photocraft e myBOOK)
   ========================================================================== */
.authors-section {
  margin-top: 22px;
  margin-bottom: 18px;
}

.authors-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 820px;
  width: 100%;
  margin: 10px auto 0;
}

.authors-unified-card {
  background: var(--bg-card, #FFFFFF);
  border: 1.5px solid var(--border-card, #CBD5E1);
  border-radius: var(--card-radius, 18px);
  padding: 16px 20px;
  box-shadow: var(--shadow-card, 0 8px 24px rgba(15, 23, 42, 0.08));
  max-width: 820px;
  width: 100%;
  margin: 10px auto 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  text-align: left;
}

.authors-cards-stack .authors-unified-card,
.authors-unified-card.author-isolated-card {
  margin: 0 auto;
}

.author-entry {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.author-compact-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.author-avatar-ring {
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #2B98F0;
  box-shadow: 0 0 0 2px rgba(43, 152, 240, 0.22), 0 4px 12px rgba(2, 132, 199, 0.20);
  background: #0F172A;
  flex-shrink: 0;
  display: block;
}

:root[data-theme="dark"] .author-avatar-ring {
  border-color: #38BDF8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.28), 0 4px 14px rgba(0, 0, 0, 0.45);
}

.author-compact-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
}

.author-compact-meta h3,
.author-entry h3 {
  font-family: 'Fira Sans', sans-serif;
  font-size: 1.32rem;
  font-weight: 900;
  color: var(--text-card-title, #0F172A);
  margin: 0 0 2px 0 !important;
  line-height: 1.12 !important;
  letter-spacing: -0.01em;
}

.author-compact-meta .author-role,
.author-entry .author-role {
  font-family: 'Fira Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  font-style: italic;
  color: var(--text-card-title, #1E293B);
  margin: 0 0 4px 0 !important;
  line-height: 1.24 !important;
}

:root[data-theme="dark"] .author-compact-meta .author-role,
:root[data-theme="dark"] .author-entry .author-role {
  color: #E2E8F0;
}

.author-short-bio,
.author-entry p {
  font-size: 0.90rem;
  color: var(--text-card-body, #334155);
  line-height: 1.42 !important;
  margin: 0 !important;
  text-align: left;
}

.authors-card-divider {
  height: 1px;
  background: var(--card-divider, rgba(148, 163, 184, 0.28));
  margin: 12px 0;
  border: none;
}

.authors-more-link-row {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-card, rgba(148, 163, 184, 0.38));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.authors-more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 9999px;
  background: rgba(2, 132, 199, 0.10);
  border: 1.5px solid rgba(43, 152, 240, 0.45);
  color: #0369A1;
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.18s ease;
  line-height: 1.2;
}

:root[data-theme="dark"] .authors-more-link {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.48);
  color: #38BDF8;
}

.authors-more-link:hover {
  background: #2B98F0;
  border-color: #2B98F0;
  color: #FFFFFF !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(43, 152, 240, 0.28);
}

/* Avatares duplos e link no Cartão Manifesto Cívico */
.cgd-manifesto-authors-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.cgd-manifesto-avatars {
  display: inline-flex;
  align-items: center;
}

.cgd-manifesto-avatar-mini {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #2B98F0;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
  background: #0F172A;
}

.cgd-manifesto-avatar-mini + .cgd-manifesto-avatar-mini {
  margin-left: -8px;
}

.cgd-manifesto-bio-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  color: #0284C7;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 4px;
}

:root[data-theme="dark"] .cgd-manifesto-bio-link {
  color: #38BDF8;
}

.cgd-manifesto-bio-link:hover {
  color: #0369A1;
}

:root[data-theme="dark"] .cgd-manifesto-bio-link:hover {
  color: #7DD3FC;
}

@media (max-width: 640px) {
  .author-avatar-ring {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    border-width: 2.5px;
  }
  .author-compact-header {
    gap: 11px;
  }
  .author-compact-meta h3,
  .author-entry h3 {
    font-size: 1.16rem !important;
  }
  .author-compact-meta .author-role,
  .author-entry .author-role {
    font-size: 0.81rem !important;
  }
  .authors-more-link {
    width: 100%;
    font-size: 0.86rem;
    padding: 8px 12px;
  }
}

/* ==========================================================================
 * MÓDULO 05: 05_plugins_games_quizzes.css
 * Responsabilidade: Sistema Universal de Plugins (.plugin-card, .quiz-card,
 * .game-hero-box, .post-plugin-full, .plugin-header-topbar, .btn-plugin-pin-pill),
 * estatísticas de jogos, calculadoras (.calc-*) e grelha .plugins-grid.
 * ========================================================================== */

/* ==========================================================================
   10. SISTEMA UNIVERSAL DE PLUGINS DO ECOSSISTEMA myBOOK (MODELO REJUVENESCER)
   Partilhado por todos os sites para garantir 100% de coerência visual
   ========================================================================== */
.game-hero-box,
.post-plugin-full {
  background: var(--bg-card, #DEE7F0) !important;
  border: 2.5px solid #0077c8 !important;
  border-radius: 20px !important;
  padding: 0 !important;
  position: relative !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 8px 24px rgba(0, 119, 200, 0.12) !important;
}

.game-hero-box {
  max-width: 880px !important;
  width: 100% !important;
  margin: 0 auto 28px !important;
}

.post-plugin-full {
  margin-left: calc(-1 * var(--card-pad-x, 20px)) !important;
  margin-right: calc(-1 * var(--card-pad-x, 20px)) !important;
  width: calc(100% + (2 * var(--card-pad-x, 20px))) !important;
  margin-bottom: 22px !important;
}

[data-theme="dark"] .game-hero-box,
[data-theme="dark"] .post-plugin-full {
  background: #111A2E !important;
  border-color: #00A3FF !important;
  box-shadow: 0 8px 28px rgba(0, 163, 255, 0.2) !important;
}

.plugin-header-topbar {
  background: #596068 !important;
  color: #FFFFFF !important;
  font-family: 'Fira Sans Condensed', sans-serif !important;
  font-weight: 800 !important;
  font-size: 15.5px !important;
  letter-spacing: 0.03em !important;
  text-align: center !important;
  padding: 9px 14px 17px 14px !important;
  border-radius: 17px 17px 0 0 !important;
  border-bottom: 2.5px solid #0077c8 !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  user-select: none !important;
}

[data-theme="dark"] .plugin-header-topbar {
  background: #1E293B !important;
  color: #F8FAFC !important;
  border-bottom: 2px solid #00A3FF !important;
}

.plugin-content-body {
  padding: 0 16px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

.plugin-pin-center-row {
  display: flex !important;
  justify-content: center !important;
  position: relative !important;
  z-index: 10 !important;
  margin-top: -18px !important;
  margin-bottom: 8px !important;
}

.btn-plugin-pin-pill {
  background: #C2DCF0 !important;
  border: 2px solid #0077c8 !important;
  border-radius: 999px !important;
  padding: 3px 16px 3px 26px !important;
  display: inline-flex !important;
  align-items: center !important;
  position: relative !important;
  cursor: pointer !important;
  user-select: none !important;
  transition: all 0.18s ease !important;
  text-decoration: none !important;
  overflow: visible !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14) !important;
}

.btn-plugin-pin-pill:hover {
  background: #B4D4ED !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 10px rgba(0, 119, 200, 0.25) !important;
}

.btn-plugin-pin-pill .pin-svg-icon,
.btn-plugin-pin-pill img.cgd-btn-3d-icon.pin-svg-icon {
  position: absolute !important;
  left: -13px !important;
  top: -11px !important;
  width: 38px !important;
  height: 38px !important;
  max-width: 38px !important;
  margin: 0 !important;
  filter: drop-shadow(0 2.5px 4px rgba(0, 0, 0, 0.34)) !important;
  pointer-events: none !important;
  overflow: visible !important;
}

.btn-plugin-pin-pill .pin-text {
  font-family: 'Fira Sans Condensed', sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  color: #003B6D !important;
  letter-spacing: 0.01em !important;
  white-space: nowrap !important;
}

.btn-plugin-pin-pill .pin-text-full {
  display: inline !important;
}

.btn-plugin-pin-pill .brand-my {
  color: #003B6D !important;
  font-weight: 800 !important;
}

.btn-plugin-pin-pill .brand-book {
  color: #0084FF !important;
  font-weight: 900 !important;
}

[data-theme="dark"] .btn-plugin-pin-pill {
  background: #0B1325 !important;
  border-color: #00A3FF !important;
}

[data-theme="dark"] .btn-plugin-pin-pill .pin-text,
[data-theme="dark"] .btn-plugin-pin-pill .brand-my {
  color: #F8FAFC !important;
}

[data-theme="dark"] .btn-plugin-pin-pill .brand-book {
  color: #38BDF8 !important;
}

.plugin-title-centered-box {
  text-align: center !important;
  padding: 0 4px !important;
  margin-top: 4px !important;
  margin-bottom: 3px !important;
}

.post-card .plugin-title-centered-box {
  margin-top: 8px !important;
}

.plugin-game-title {
  font-family: 'Fira Sans Condensed', sans-serif !important;
  font-size: 24px !important;
  font-weight: 900 !important;
  color: #003B6D !important;
  line-height: 1.1 !important;
  letter-spacing: -0.01em !important;
  margin-top: 0 !important;
  margin-bottom: 2px !important;
}

[data-theme="dark"] .plugin-game-title {
  color: #FFFFFF !important;
}

.plugin-game-subtitle {
  font-family: 'Fira Sans', sans-serif !important;
  font-size: 13px !important;
  color: #003B6D !important;
  font-weight: 500 !important;
  line-height: 1.22 !important;
  margin: 0 auto 3px auto !important;
  max-width: 620px !important;
  padding: 0 4px !important;
}

[data-theme="dark"] .plugin-game-subtitle {
  color: #94A3B8 !important;
}

.plugin-stats-2lines-row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  text-align: center !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin-top: 0 !important;
  margin-bottom: 1px !important;
  padding: 0 !important;
  gap: 2px !important;
}

.stat-col {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding: 0 !important;
}

.stat-col .stat-icon {
  font-size: 28px !important;
  line-height: 1 !important;
  margin-bottom: 3px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
}

.stat-col .stat-icon img.cgd-btn-3d-icon {
  height: 44px !important;
  width: auto !important;
  max-width: 60px !important;
  margin: 0 !important;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.32)) !important;
}

.stat-col .stat-label-val {
  font-family: 'Fira Sans Condensed', sans-serif !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #003B6D !important;
  white-space: nowrap !important;
  letter-spacing: 0.01em !important;
  line-height: 1 !important;
}

[data-theme="dark"] .stat-col .stat-label-val {
  color: #E2E8F0 !important;
}

.stat-val-score { color: #0000FF !important; font-weight: 900 !important; margin-left: 1px !important; }
.stat-val-combo { color: #D4A000 !important; font-weight: 900 !important; margin-left: 1px !important; }
.stat-val-hits { color: #16A34A !important; font-weight: 900 !important; margin-left: 1px !important; }
.stat-val-rem { color: #15803D !important; font-weight: 900 !important; margin-left: 1px !important; }
[data-theme="dark"] .stat-val-score { color: #38BDF8 !important; }
[data-theme="dark"] .stat-val-combo { color: #FACC15 !important; }
[data-theme="dark"] .stat-val-hits { color: #4ADE80 !important; }
[data-theme="dark"] .stat-val-rem { color: #4ADE80 !important; }

.game-stats-row {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  align-items: end !important;
  justify-items: center !important;
  text-align: center !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 6px 0 4px 0 !important;
  margin-top: 4px !important;
  margin-bottom: 6px !important;
  gap: 8px !important;
  font-family: 'Fira Sans Condensed', sans-serif !important;
  font-weight: 800 !important;
  width: 100% !important;
  max-width: 480px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.memory-stat-col {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  padding: 0 !important;
}

.memory-stat-icon {
  font-size: 2.1rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 46px !important;
}

.memory-stat-icon img.cgd-btn-3d-icon {
  height: 46px !important;
  width: auto !important;
  max-width: 62px !important;
  margin: 0 !important;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.32)) !important;
}

.memory-stat-val {
  font-family: 'Fira Sans Condensed', sans-serif !important;
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  color: var(--text-card-title, #0C3E75) !important;
  line-height: 1 !important;
  letter-spacing: 0.01em !important;
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.memory-diff-toggle {
  background: transparent;
  border: 1.5px solid var(--border-card, #B6C8DC);
  border-radius: 7px;
  padding: 3px 10px;
  min-height: 32px;
  font-family: 'Fira Sans Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-card-title, #0C3E75);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

[data-theme="dark"] .memory-diff-toggle {
  border-color: rgba(148, 163, 184, 0.35);
  color: #FFFFFF;
}

.memory-diff-arrow {
  font-size: 0.72rem;
  color: #0F172A !important;
  transition: transform 0.2s ease;
  display: inline-block;
  line-height: 1;
}

[data-theme="dark"] .memory-diff-arrow {
  color: #F8FAFC !important;
}

.plugin-game-box {
  border: 2px solid #0077c8 !important;
  border-radius: 14px !important;
  background: #FFFFFF !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  margin-top: 0 !important;
  margin-bottom: 6px !important;
  box-shadow: 0 2px 8px rgba(0, 119, 200, 0.08) !important;
}

[data-theme="dark"] .plugin-game-box {
  background: #0A1120 !important;
  border-color: #00A3FF !important;
}

.game-visual-strip {
  background: linear-gradient(180deg, #F0F6FA 0%, #E2EEF7 100%) !important;
  width: 100% !important;
  min-height: 112px !important;
  max-height: 130px !important;
  padding: 4px 10px 0 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 2 !important;
}

[data-theme="dark"] .game-visual-strip {
  background: linear-gradient(180deg, #131F37 0%, #0B1326 100%) !important;
}

.game-visual-strip img, .game-visual-strip svg {
  max-width: 88% !important;
  max-height: 118px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin-bottom: -10px !important;
  position: relative !important;
  z-index: 3 !important;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.26)) !important;
}

/* Cartas 3D da Memória Celular e Emblemas 3D de Ferramentas & Questionários */
.memory-card img.memory-card-3d-img {
  width: 78% !important;
  height: 78% !important;
  max-width: 72px !important;
  max-height: 72px !important;
  object-fit: contain !important;
  display: block !important;
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.24)) !important;
  pointer-events: none !important;
}

.memory-card img.memory-card-3d-img.is-back {
  width: 64% !important;
  height: 64% !important;
  max-width: 54px !important;
  max-height: 54px !important;
  opacity: 0.92 !important;
}

.memory-card.flipped img.memory-card-3d-img {
  transform: scaleX(-1) !important;
}

.cgd-plugin-hero-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 7px auto !important;
}

.cgd-plugin-hero-3d,
.cgd-trophy-3d-hero {
  height: 50px !important;
  width: auto !important;
  max-width: 90px !important;
  object-fit: contain !important;
  display: inline-block !important;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25)) !important;
}

.plugin-footer-chapter img.cgd-btn-3d-icon,
.plugin-chapter-clean img.cgd-btn-3d-icon {
  height: 22px !important;
  width: auto !important;
  max-width: 32px !important;
  vertical-align: -5px !important;
  margin-right: 4px !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.24)) !important;
}

.composer-plugin-option-icon img.cgd-btn-3d-icon,
#composerPluginPreviewIcon img.cgd-btn-3d-icon,
#composerPluginPreviewIconSuite img.cgd-btn-3d-icon {
  height: 34px !important;
  width: auto !important;
  max-width: 48px !important;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.26)) !important;
}

.game-item-title-box {
  border-top: 1.5px solid #0077c8 !important;
  background: #FFFFFF !important;
  padding: 6px 8px 3px 8px !important;
  text-align: center !important;
  font-family: 'Fira Sans Condensed', sans-serif !important;
  font-size: 16.5px !important;
  font-weight: 800 !important;
  color: #003B6D !important;
  line-height: 1.15 !important;
  letter-spacing: 0.01em !important;
  position: relative !important;
  z-index: 1 !important;
}

[data-theme="dark"] .game-item-title-box {
  border-top-color: rgba(56, 189, 248, 0.2) !important;
  background: #0A1120 !important;
  color: #FFFFFF !important;
}

.game-item-desc-box {
  border-top: 1px solid #D0E2F0 !important;
  background: #FFFFFF !important;
  padding: 5px 10px 6px 10px !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  color: #003B6D !important;
  text-align: left !important;
}

[data-theme="dark"] .game-item-desc-box {
  border-top-color: rgba(56, 189, 248, 0.2) !important;
  background: #0A1120 !important;
  color: #CBD5E1 !important;
}

.plugin-actions-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 14px !important;
  margin: 12px auto 10px auto !important;
  max-width: 440px !important;
  width: 100% !important;
}

.btn-decision {
  flex: 1 1 200px !important;
  max-width: 210px !important;
  min-width: 130px !important;
  padding: 0 16px !important;
  height: 48px !important;
  border-radius: 13px !important;
  border: none !important;
  color: #FFFFFF !important;
  font-family: 'Fira Sans Condensed', sans-serif !important;
  font-size: 18.5px !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  user-select: none !important;
}

.btn-decision-reparador {
  background: #139C43 !important;
  box-shadow: 0 3px 10px rgba(19, 156, 67, 0.35) !important;
}

.btn-decision-reparador:hover {
  background: #16AD4B !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 14px rgba(19, 156, 67, 0.45) !important;
}

.btn-decision-destruidor {
  background: #D92D20 !important;
  box-shadow: 0 3px 10px rgba(217, 45, 32, 0.35) !important;
}

.btn-decision-destruidor:hover {
  background: #EB3629 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 14px rgba(217, 45, 32, 0.45) !important;
}

.plugin-chapter-clean {
  text-align: center !important;
  margin: 6px 0 10px 0 !important;
  font-family: 'Fira Sans Condensed', sans-serif !important;
  font-size: 13.5px !important;
  color: #6B7A8A !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
}

[data-theme="dark"] .plugin-chapter-clean {
  color: #94A3B8 !important;
}


@media (max-width: 640px) {
  .game-hero-box,
  .post-plugin-full {
    border-radius: 18px !important;
  }
  .plugin-header-topbar {
    font-size: 14px !important;
    padding: 8px 10px 15px 10px !important;
    border-radius: 15px 15px 0 0 !important;
  }
  .plugin-content-body {
    padding: 0 10px !important;
  }
  .plugin-pin-center-row {
    margin-top: -18px !important;
    margin-bottom: 2px !important;
  }
  .btn-plugin-pin-pill {
    padding: 3px 14px 3px 25px !important;
    font-size: 12.5px !important;
  }
  .plugin-game-title {
    font-size: 22px !important;
  }
  .plugin-game-subtitle {
    font-size: 13px !important;
  }
  .stat-col .stat-icon {
    font-size: 24px !important;
    min-height: 38px !important;
  }
  .stat-col .stat-icon img.cgd-btn-3d-icon {
    height: 38px !important;
    max-width: 52px !important;
  }
  .stat-col .stat-label-val {
    font-size: 12.5px !important;
  }
  .game-stats-row {
    gap: 4px !important;
    margin-top: 2px !important;
    margin-bottom: 4px !important;
    padding: 4px 0 !important;
  }
  .memory-stat-col {
    gap: 3px !important;
  }
  .memory-stat-icon {
    font-size: 26px !important;
    min-height: 40px !important;
  }
  .memory-stat-icon img.cgd-btn-3d-icon {
    height: 40px !important;
    max-width: 54px !important;
  }
  .memory-stat-val {
    font-size: 14px !important;
    min-height: 24px !important;
  }
  .memory-diff-toggle {
    font-size: 13px !important;
    padding: 2px 7px !important;
    gap: 4px !important;
  }
  .btn-decision {
    height: 42px !important;
    font-size: 16px !important;
    border-radius: 10px !important;
    max-width: 180px !important;
  }
}


/* ============================================================================
   UNIFICAÇÃO DOS PLUGINS (EXTRAS VS POSTS myBOOK) — PADRÃO CARLOS DIAS
   ============================================================================ */
.btn-plugin-pin-pill.is-decorative {
  cursor: default !important;
  pointer-events: none !important;
  transform: none !important;
  user-select: none !important;
}

.plugin-header-bar {
  justify-content: center !important;
  text-align: center !important;
  padding: 9px 14px 17px 14px !important;
  height: auto !important;
}

.plugin-title-box,
.plugin-title-box h3 {
  padding-right: 0 !important;
  text-align: center !important;
}

/* Quando o plugin está inserido dentro de um Post, perde o elemento myBOOK e a votação interna */
.post-card .plugin-pin-center-row,
.post-card .btn-pin-plugin,
.post-plugin-full .plugin-pin-center-row,
.post-plugin-full .btn-pin-plugin,
.post-plugin-full .plugin-vote-bar,
.post-attached-plugin-card .plugin-vote-bar {
  display: none !important;
}

/* ============================================================================
   16. UNIFICAÇÃO DE PLUGINS NOS POSTS, COMANDOS SOCIAIS (COMENTÁRIOS, PARTILHAR,
       GUARDAR) E FUNÇÃO UNIVERSAL DE COLAGEM DA BOX DE VOTAÇÃO
   ============================================================================ */

/* 16.1. Eliminar informação repetida/redundante (#tags e divisores) nos Posts */
.post-tags-row,
.post-hairline-divider {
  display: none !important;
}

/* 16.2. Plugins inseridos em Posts: ocupam 100% da largura horizontal, sem bordas laterais,
         sem arredondamento no topo (zero "orelhas brancas") e com curva inferior limpa */
.post-card .post-plugin-full,
.post-card .post-attached-plugin-card {
  margin-left: calc(-1 * var(--card-pad-x, 14px)) !important;
  margin-right: calc(-1 * var(--card-pad-x, 14px)) !important;
  width: calc(100% + (2 * var(--card-pad-x, 14px))) !important;
  margin-top: 8px !important;
  margin-bottom: 6px !important;
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
  border-bottom: 2.5px solid #0077c8 !important;
  border-radius: 0 0 18px 18px !important;
  background: var(--bg-card, #DEE7F0) !important;
  box-shadow: 0 4px 14px rgba(0, 119, 200, 0.08) !important;
  overflow: hidden !important;
  padding: 0 !important;
}

[data-theme="dark"] .post-card .post-plugin-full,
[data-theme="dark"] .post-card .post-attached-plugin-card {
  background: #111A2E !important;
  border-bottom-color: #00A3FF !important;
}

.post-card .post-plugin-full .plugin-header-topbar,
.post-card .post-attached-plugin-card .plugin-header-topbar,
.post-card .plugin-header-bar {
  border-radius: 0 !important;
  padding: 8px 14px !important;
  border-top: 2px solid #0077c8 !important;
  border-bottom: 2px solid #0077c8 !important;
}

[data-theme="dark"] .post-card .post-plugin-full .plugin-header-topbar,
[data-theme="dark"] .post-card .post-attached-plugin-card .plugin-header-topbar,
[data-theme="dark"] .post-card .plugin-header-bar {
  border-top-color: #00A3FF !important;
  border-bottom-color: #00A3FF !important;
}

/* 16.3. Plugins em TODAS as páginas de livros (Tab Extras: Ferramentas, Questionários, Jogos)
         ocupam todo o espaço horizontal disponível na coluna/mancha (880px), sem margens laterais */
.plugins-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 22px !important;
  max-width: var(--cgd-mancha-max, 880px) !important;
  width: 100% !important;
  margin: 0 auto 28px auto !important;
}

.plugin-card,
.quiz-card,
.game-hero-box {
  max-width: var(--cgd-mancha-max, 880px) !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  border-radius: 18px !important;
  border: 2px solid #0077c8 !important;
  overflow: hidden !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

[data-theme="dark"] .plugin-card,
[data-theme="dark"] .quiz-card,
[data-theme="dark"] .game-hero-box {
  border-color: #00A3FF !important;
}

.plugin-card .plugin-header-bar,
.quiz-card .plugin-header-bar,
.game-hero-box .plugin-header-topbar {
  border-radius: 0 !important;
  background: #596068 !important;
  border-bottom: 2px solid #0077c8 !important;
}

[data-theme="dark"] .plugin-card .plugin-header-bar,
[data-theme="dark"] .quiz-card .plugin-header-bar,
[data-theme="dark"] .game-hero-box .plugin-header-topbar {
  background: #1E293B !important;
  border-bottom-color: #00A3FF !important;
}

.plugin-card .plugin-footer-meta,
.quiz-card .plugin-footer-meta {
  border-radius: 0 !important;
  border-top: none !important;
  background: transparent !important;
  padding: 4px 14px 8px 14px !important;
}


.plugin-body-content,
.plugin-content-body {
  padding: 6px 20px 16px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  box-sizing: border-box;
  width: 100%;
}
.plugin-title-box,
.plugin-title-centered-box {
  text-align: center;
  margin: 5px 0 6px 0 !important;
}
.post-card .plugin-title-centered-box {
  margin-top: 8px !important;
}
.plugin-title-box h3,
.plugin-game-title {
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--text-card-title, #003B6D);
  line-height: 1.15 !important;
  padding-top: 2px !important;
  margin: 0 0 4px 0;
  text-align: center;
}
.plugin-lead-text,
.plugin-game-subtitle {
  font-size: 0.94rem;
  color: var(--text-card-body, #1E3A8A);
  line-height: 1.42;
  margin: 0 auto 14px auto;
  max-width: 720px;
}
.plugin-chapter-clean,
.plugin-footer-chapter {
  text-align: center;
  margin: 6px 0 10px 0;
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 13.5px;
  color: #6B7A8A;
  font-weight: 600;
}
[data-theme="dark"] .plugin-chapter-clean,
[data-theme="dark"] .plugin-footer-chapter {
  color: #94A3B8;
}
.calc-row {
  margin-bottom: 8px;
  text-align: left;
}
.calc-label {
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--text-card-title, #0A2540);
  margin-bottom: 2px;
  line-height: 1.15;
  display: block;
}
.calc-select {
  width: 100%;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--input-bg, #FFFFFF);
  border: 1.5px solid var(--input-border, #CBD5E1);
  color: var(--input-text, #0F172A);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  outline: none;
}
.calc-result-box {
  background: var(--bg-card-elevated, #FFFFFF);
  border: 1.5px solid var(--accent-cyan, #0284C7);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 14px;
  display: none;
  text-align: left;
}
.btn-tier {
  width: 100%;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--gradient-brand, linear-gradient(135deg, #0284C7, #00A3FF));
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.94rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.btn-tier:hover:not(:disabled) {
  opacity: 0.93;
  transform: translateY(-1px);
}
.tier-box > .btn-tier:hover:not(:disabled) {
  transform: translateX(-50%) translateY(-1px);
}
.tier-box > .btn-tier:disabled,
.tier-box > .btn-tier:disabled:hover {
  transform: translateX(-50%) !important;
  opacity: 1 !important;
  transition: none !important;
  cursor: not-allowed !important;
}

/* ============================================================================
   17. MODAIS DE FEEDBACK E RESULTADOS DOS JOGOS (PARTILHADOS EM REJUVE & myBOOK)
   ============================================================================ */
.teaser-modal {
  display: none;
  align-items: center;
  justify-content: center;
}
#gameFeedbackModal, #gameResultsModal {
  z-index: 100000 !important;
}
#gameFeedbackModal.open, #gameResultsModal.open {
  display: flex !important;
}
#gameFeedbackModal .teaser-modal-backdrop, #gameResultsModal .teaser-modal-backdrop {
  position: absolute !important;
  inset: 0 !important;
  z-index: 100000 !important;
  background: rgba(7, 9, 14, 0.82) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
#gameFeedbackModal .teaser-modal-content, #gameResultsModal .teaser-modal-content {
  position: relative !important;
  z-index: 100001 !important;
  background: var(--bg-card, var(--card-bg, #FFFFFF)) !important;
  border: 1.5px solid var(--border-card-hover, #00A3FF);
  box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.8) !important;
}
.teaser-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: var(--bg-card-elevated, var(--card-bg-elevated, #F1F5F9));
  border: 1px solid var(--border-card, #CBD5E1);
  color: var(--text-card-title, var(--text-heading, #0C3E75));
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.teaser-modal-close:hover {
  background: var(--accent-cyan, #00A3FF);
  color: #FFFFFF;
  border-color: var(--accent-cyan, #00A3FF);
}
#gameFeedbackVisual {
  width: 128px;
  height: 128px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  padding: 0 !important;
  position: relative;
  z-index: 2;
}
#gameFeedbackVisual img {
  width: 100% !important;
  height: 100% !important;
  max-width: 128px !important;
  max-height: 128px !important;
  object-fit: contain !important;
  display: block !important;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.22));
}
.game-feedback-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: -4px;
  line-height: 1;
  position: relative;
  z-index: 3;
}
.game-feedback-badge.badge-correct {
  background: rgba(34, 197, 94, 0.14);
  color: #16A34A;
  border: 1.5px solid rgba(34, 197, 94, 0.4);
}
.game-feedback-badge.badge-wrong {
  background: rgba(239, 68, 68, 0.14);
  color: #DC2626;
  border: 1.5px solid rgba(239, 68, 68, 0.4);
}
.game-feedback-badge.badge-info {
  background: rgba(0, 163, 255, 0.14);
  color: #0284C7;
  border: 1.5px solid rgba(0, 163, 255, 0.4);
}
[data-theme="dark"] .game-feedback-badge.badge-correct {
  color: #4ADE80;
  background: rgba(34, 197, 94, 0.22);
}
[data-theme="dark"] .game-feedback-badge.badge-wrong {
  color: #F87171;
  background: rgba(239, 68, 68, 0.22);
}
[data-theme="dark"] .game-feedback-badge.badge-info {
  color: #38BDF8;
  background: rgba(0, 163, 255, 0.22);
}

/* ==========================================================================
 * MÓDULO 06: 06_mybook_feed_composer.css
 * Responsabilidade: Sistema Unificado myBOOK (filtros por livro, composer,
 * cartões de publicação .post-card), barra de 3 comandos sociais (.post-social-bar)
 * e gaveta interativa de comentários (.post-comments-drawer).
 * ========================================================================== */

/* ==========================================================================
   13. SISTEMA UNIFICADO myBOOK: ZERO DESPERDÍCIO DE ESPAÇO, FILTRO POR LIVRO,
       COMPOSER COMPACTO E BARRA DE COMANDOS NUMA ÚNICA LINHA (PADRÃO CARLOS DIAS)
   ========================================================================== */
.mybook-stream-container {
  gap: 12px !important;
  padding-top: 0 !important;
}

#feedStream,
#feedStreamSuite {
  gap: 12px !important;
}

.mybook-book-filter-bar {
  background: var(--bg-card, #F1F5F9);
  border: 1.5px solid var(--border-card, #CBD5E1);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  box-shadow: var(--shadow-card, 0 2px 8px rgba(15, 23, 42, 0.04));
}

.mybook-filter-label-group {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  gap: 5px;
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-card-title, #0C3E75);
  text-transform: none;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.mybook-filter-dropdown-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 110;
}

.mybook-filter-dropdown-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  min-height: 36px;
  padding: 0 12px 0 10px;
  border-radius: 10px;
  border: 1.5px solid var(--border-accent, #0088CC);
  background: var(--bg-card-elevated, #FFFFFF);
  color: var(--text-card-title, #0C3E75);
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 136, 204, 0.14);
  transition: all 0.18s ease;
  user-select: none;
  white-space: nowrap;
}

[data-theme="dark"] .mybook-filter-dropdown-btn {
  background: #10192A;
  border-color: #38BDF8;
  color: #F8FAFC;
  box-shadow: 0 2px 10px rgba(0, 163, 255, 0.22);
}

.mybook-filter-dropdown-btn:hover {
  border-color: #00A3FF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 163, 255, 0.25);
}

.mybook-filter-dropdown-btn .mybook-filter-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mybook-filter-dropdown-btn .mybook-filter-btn-icon .cgd-btn-3d-icon {
  width: 24px !important;
  height: 24px !important;
  object-fit: contain;
}

.mybook-filter-dropdown-btn .mybook-filter-btn-label {
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.mybook-filter-dropdown-btn .btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  margin-left: 2px;
  color: #0284C7;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

[data-theme="dark"] .mybook-filter-dropdown-btn .btn-arrow {
  color: #38BDF8;
}

.mybook-filter-dropdown-btn[aria-expanded="true"] .btn-arrow {
  transform: rotate(180deg);
}

.mybook-filter-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 250px;
  max-width: 92vw;
  background: var(--bg-card-elevated, #FFFFFF);
  border: 1.5px solid var(--border-accent, #00A3FF);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.28);
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1250;
}

[data-theme="dark"] .mybook-filter-dropdown-menu {
  background: #0B1324;
  border-color: #00A3FF;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
}

.mybook-filter-dropdown-menu.open {
  display: flex;
  animation: modalFadeIn 0.16s ease;
}

.mybook-filter-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-card-title, #0F172A);
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.90rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme="dark"] .mybook-filter-dropdown-item {
  color: #F8FAFC;
}

.mybook-filter-dropdown-item:hover {
  background: rgba(0, 163, 255, 0.12);
  border-color: rgba(0, 163, 255, 0.3);
}

.mybook-filter-dropdown-item.active {
  background: rgba(2, 132, 199, 0.16);
  border-color: #00A3FF;
  color: #0284C7;
}

[data-theme="dark"] .mybook-filter-dropdown-item.active {
  background: rgba(0, 163, 255, 0.22);
  border-color: #38BDF8;
  color: #38BDF8;
}

.mybook-filter-dropdown-item .cgd-btn-3d-icon {
  width: 24px !important;
  height: 24px !important;
  object-fit: contain;
  flex-shrink: 0;
}

.mybook-filter-dropdown-item .filter-item-check {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 900;
  opacity: 0;
  color: #00A3FF;
}

.mybook-filter-dropdown-item.active .filter-item-check {
  opacity: 1;
}

.mybook-filter-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  width: 100%;
}

.mybook-filter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 4px 12px 4px 0;
  border-radius: 999px;
  border: 1.5px solid var(--border-card, #CBD5E1);
  background: var(--bg-card-elevated, #FFFFFF);
  color: var(--text-card-title, #0F172A);
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
  line-height: 1.15;
}

.mybook-filter-pill:hover {
  border-color: #00A3FF;
  transform: translateY(-1px);
}

.mybook-filter-pill.active[data-book="all"],
.mybook-filter-pill.active[data-book="rejuve"] {
  background: #0284C7;
  border-color: #00A3FF;
  color: #FFFFFF !important;
  box-shadow: 0 2px 6px rgba(0, 163, 255, 0.25);
}

.mybook-filter-pill.active[data-book="dating"] {
  background: #DB2777;
  border-color: #EC4899;
  color: #FFFFFF !important;
  box-shadow: 0 2px 6px rgba(219, 39, 119, 0.25);
}

.mybook-filter-pill.active[data-book="revolution"] {
  background: #D97706;
  border-color: #F59E0B;
  color: #FFFFFF !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

/* Cartão Compacto de Criação de Post — Finger-Friendly & Zero Desperdício */
.composer-card {
  padding: 12px 14px 13px 16px !important;
  border-radius: 10px !important;
  overflow: visible !important;
}

.composer-form-heading {
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif !important;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: var(--text-card-title, var(--text-heading, #0C3E75)) !important;
  text-align: center !important;
  margin: 0 0 10px 0 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.01em !important;
}

[data-theme="dark"] .composer-form-heading {
  color: #F8FAFC !important;
}

.composer-book-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.composer-book-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  position: relative;
}

.composer-book-picker-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.composer-book-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  height: 38px;
  background: var(--input-bg, var(--box-inner-bg, #FFFFFF));
  border: 1.5px solid var(--input-border, var(--border-input, #B6C8DC));
  border-radius: 8px;
  padding: 0 10px;
  color: var(--input-text, var(--text-heading, #0C3E75));
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  text-align: left;
  min-width: 0;
}

[data-theme="dark"] .composer-book-dropdown-btn {
  background: #10192A;
  border-color: #475569;
  color: #F8FAFC;
}

.composer-book-dropdown-btn.is-placeholder {
  border-color: #0284C7;
  color: var(--text-card-title, #0284C7);
}

[data-theme="dark"] .composer-book-dropdown-btn.is-placeholder {
  border-color: #38BDF8;
  color: #38BDF8;
}

.composer-book-dropdown-btn.needs-selection-pulse {
  border-color: #F59E0B !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.28) !important;
}

.composer-book-dropdown-btn:hover,
.composer-book-dropdown-btn[aria-expanded="true"] {
  border-color: #00A3FF;
  box-shadow: 0 0 0 2px rgba(0, 163, 255, 0.18);
}

.composer-book-btn-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-book-btn-content .cgd-btn-3d-icon {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain;
  flex-shrink: 0;
}

.composer-book-dropdown-btn .btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  color: #0284C7;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

[data-theme="dark"] .composer-book-dropdown-btn .btn-arrow {
  color: #38BDF8;
}

.composer-book-dropdown-btn[aria-expanded="true"] .btn-arrow {
  transform: rotate(180deg);
}

.composer-book-dropdown-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 90vw;
  background: var(--bg-card-elevated, #FFFFFF);
  border: 1.5px solid #00A3FF;
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
  display: none;
  flex-direction: column;
  gap: 3px;
  z-index: 1300;
}

[data-theme="dark"] .composer-book-dropdown-menu {
  background: #0B1324;
  border-color: #38BDF8;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.6);
}

.composer-book-dropdown-menu.open {
  display: flex;
  animation: modalFadeIn 0.16s ease;
}

.composer-book-dropdown-header {
  padding: 5px 9px 4px 9px;
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-page-muted, #64748B);
  border-bottom: 1px solid var(--border-card, rgba(148, 163, 184, 0.22));
  margin-bottom: 2px;
}

[data-theme="dark"] .composer-book-dropdown-header {
  color: #94A3B8;
}

.composer-book-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-card-title, #0F172A);
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme="dark"] .composer-book-dropdown-item {
  color: #F8FAFC;
}

.composer-book-dropdown-item:hover {
  background: rgba(0, 163, 255, 0.12);
  border-color: rgba(0, 163, 255, 0.3);
}

.composer-book-dropdown-item.active {
  background: rgba(2, 132, 199, 0.16);
  border-color: #00A3FF;
  color: #0284C7;
}

[data-theme="dark"] .composer-book-dropdown-item.active {
  background: rgba(0, 163, 255, 0.22);
  border-color: #38BDF8;
  color: #38BDF8;
}

.composer-book-dropdown-item .cgd-btn-3d-icon {
  width: 22px !important;
  height: 22px !important;
  object-fit: contain;
  flex-shrink: 0;
}

.composer-card .composer-title-label {
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif !important;
  font-size: 0.90rem !important;
  font-weight: 800 !important;
  min-width: 38px !important;
  margin: 0 !important;
  line-height: 1 !important;
}

.composer-book-field:nth-child(2) .composer-title-label {
  min-width: auto !important;
}

.composer-book-select {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 38px;
  background: var(--input-bg, var(--box-inner-bg, #FFFFFF));
  border: 1px solid var(--input-border, var(--border-input, #B6C8DC));
  border-radius: 8px;
  padding: 0 10px;
  color: var(--input-text, var(--text-heading, #0C3E75));
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.90rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.composer-book-select:focus {
  border-color: #00A3FF;
  box-shadow: 0 0 0 2px rgba(0, 163, 255, 0.16);
}

.composer-title-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}

.composer-title-input {
  height: 38px !important;
  padding: 0 10px !important;
  font-size: 0.92rem !important;
  border-radius: 8px !important;
}

.composer-unified-box {
  margin-bottom: 13px !important;
  border-radius: 8px !important;
}

.composer-split-upper {
  min-height: 74px !important;
}

/* Quando a imagem é inserida À ESQUERDA (ao lado do texto) */
.composer-split-upper.img-left {
  flex-direction: row-reverse !important;
}

.composer-split-upper.img-left .composer-zone-lateral {
  border-left: none !important;
  border-right: 1px solid var(--card-divider, rgba(12, 62, 117, 0.14)) !important;
}

.composer-textarea-cell {
  padding: 0 !important;
}

.composer-textarea {
  min-height: 74px !important;
  padding: 6px 10px !important;
  font-size: 0.94rem !important;
  line-height: 1.36 !important;
}

/* Barra Inferior do Composer: Botões Out-of-the-Box 3D + Espaçamento Finger-Friendly */
.composer-bottom-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  row-gap: 10px !important;
  margin-top: 0 !important;
  flex-wrap: wrap !important;
  overflow: visible !important;
}

.composer-actions-left,
.composer-controls-left {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
  flex-wrap: wrap !important;
  min-width: 0;
  overflow: visible !important;
}

.composer-img-dropdown-wrap {
  position: relative;
  display: inline-flex;
  overflow: visible !important;
}

.btn-composer-cmd {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 11px 0 0 !important;
  border-radius: 10px !important;
  border: 1.5px solid #B6C6DB !important;
  background: #DEE5F0 !important;
  color: #1C3E74 !important;
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif !important;
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  position: relative !important;
  overflow: visible !important;
  transition: all 0.15s ease;
}

[data-theme="dark"] .btn-composer-cmd {
  background: #1A2438 !important;
  border: 1.5px solid #64748B !important;
  color: #E2E8F0 !important;
}

.btn-composer-cmd:hover,
.btn-composer-cmd.has-active {
  border-color: #00A3FF !important;
  color: #0284C7 !important;
  background: #E8EFF8 !important;
}

[data-theme="dark"] .btn-composer-cmd:hover,
[data-theme="dark"] .btn-composer-cmd.has-active {
  color: #38BDF8 !important;
  border-color: #38BDF8 !important;
  background: rgba(56, 189, 248, 0.14) !important;
}

.btn-composer-cmd .cmd-caret {
  font-size: 0.72rem;
  opacity: 0.8;
  line-height: 1;
}

.composer-img-dropdown-menu {
  display: none;
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  min-width: 245px;
  background: var(--bg-card-elevated, var(--box-inner-bg, #FFFFFF));
  border: 1.5px solid #00A3FF;
  border-radius: 9px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
  padding: 5px;
  z-index: 1200;
}

.composer-img-dropdown-menu.open {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.composer-img-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-card-title, var(--text-heading, #0C3E75));
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.composer-img-dropdown-item:hover {
  background: rgba(0, 163, 255, 0.12);
}

.composer-img-dropdown-item strong {
  font-weight: 800;
}

.btn-publicar {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 20px !important;
  font-size: 0.94rem !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 0 0 auto !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Drawer / Painel de Escolha de Plugins do Livro no Composer */
.composer-plugin-drawer {
  display: none;
  margin-top: 8px;
  padding: 10px;
  border-radius: 9px;
  background: var(--bg-card, #F8FAFC);
  border: 1.5px solid var(--accent-cyan, #00A3FF);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.composer-plugin-drawer.open {
  display: block;
  animation: modalFadeIn 0.2s ease;
}

.composer-plugin-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-card, rgba(148, 163, 184, 0.25));
}

.composer-plugin-drawer-title {
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-card-title, #0C3E75);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.composer-plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 6px;
}

.composer-plugin-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid var(--border-card, #CBD5E1);
  background: var(--bg-card-elevated, #FFFFFF);
  color: var(--text-card-title, #0F172A);
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
  font-family: inherit;
}

.composer-plugin-option:hover,
.composer-plugin-option.selected {
  border-color: #00A3FF;
  background: rgba(0, 163, 255, 0.08);
}

.composer-plugin-option-icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.composer-plugin-option-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.composer-plugin-option-title {
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-card-title, #0C3E75);
  line-height: 1.15;
}

.composer-plugin-option-desc {
  font-size: 0.74rem;
  color: var(--text-page-muted, #64748B);
  line-height: 1.25;
}

/* Preview de Plugin Selecionado no Rascunho do Composer */
.composer-plugin-preview {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(0, 163, 255, 0.09);
  border-top: 1px solid var(--border-card, rgba(148, 163, 184, 0.25));
}

.composer-plugin-preview.is-active {
  display: flex;
}

/* Compactação Geral dos Cartões de Post no Feed (padding inferior = 0 para a barra de votação fechar na base como apêndice) */
.post-card {
  --card-pad-x: 10px !important;
  --card-pad-y: 10px !important;
  padding: var(--card-pad-y) var(--card-pad-x) 0 var(--card-pad-x) !important;
  border-radius: 14px !important;
  display: flex !important;
  flex-direction: column !important;
}

.post-card.is-filtered-out,
.post-card[hidden] {
  display: none !important;
}

/* Barra Cinzenta de Topo do Post (Modelo Photocraft Carlos Dias: REJUVENESCER + Ícone 3D, ||| e X, Avatar Sobreposto) */
.post-card-topbar {
  background: #5B636E !important;
  margin-top: calc(-1 * var(--card-pad-y, 12px)) !important;
  margin-left: calc(-1 * var(--card-pad-x, 14px)) !important;
  margin-right: calc(-1 * var(--card-pad-x, 14px)) !important;
  width: calc(100% + (2 * var(--card-pad-x, 14px))) !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 14px 0 132px !important;
  border-radius: 12px 12px 0 0 !important;
  border-bottom: 1.5px solid #3E4652 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: relative !important;
  z-index: 2 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

[data-theme="dark"] .post-card-topbar {
  background: #1E293B !important;
  border-bottom-color: #334155 !important;
}

.post-card-topbar .post-book-badge {
  background: transparent !important;
  border: none !important;
  color: #FFFFFF !important;
  padding: 0 !important;
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif !important;
  font-size: 0.94rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-decoration: none !important;
  overflow: visible !important;
  position: relative !important;
}

.post-card-topbar .post-book-badge .cgd-btn-3d-icon {
  height: 44px !important;
  max-width: 52px !important;
  margin: -10px 0 -10px -8px !important;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.38)) !important;
}

.post-card-topbar .post-ctrls-top {
  margin-top: 0 !important;
  gap: 16px !important;
  display: flex !important;
  align-items: center !important;
}

.post-card-topbar .btn-close-dismiss {
  color: #CBD5E1 !important;
}

.post-card-topbar .btn-close-dismiss:hover {
  color: #FFFFFF !important;
}

.post-header-editorial {
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
  margin-bottom: 4px !important;
  position: relative !important;
  z-index: 3 !important;
}

.post-header-editorial.has-post-topbar .author-avatar-large {
  width: 100px !important;
  height: 100px !important;
  min-width: 100px !important;
  margin-top: -32px !important;
  margin-left: -4px !important;
  box-shadow: 0 0 0 3.5px #00A3FF, 0 5px 14px rgba(0, 0, 0, 0.28) !important;
  position: relative !important;
  z-index: 4 !important;
}

.author-avatar-large {
  width: 96px !important;
  height: 96px !important;
  min-width: 96px !important;
}

.header-meta-col {
  min-height: 62px !important;
  padding-top: 5px !important;
  justify-content: flex-start !important;
  gap: 2px !important;
}

.author-name-time {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 1px !important;
}

.post-book-meta-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  margin-bottom: 1px !important;
}

.post-header-editorial.has-post-topbar .post-category-badge {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif !important;
  font-size: 0.90rem !important;
  font-weight: 800 !important;
  color: var(--text-page-muted, #475569) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}

[data-theme="dark"] .post-header-editorial.has-post-topbar .post-category-badge {
  color: #94A3B8 !important;
}

.post-header-editorial.has-post-topbar .post-category-badge .cgd-btn-3d-icon {
  height: 22px !important;
  max-width: 26px !important;
  margin: -2px 0 !important;
}

.post-header-editorial.has-post-topbar .author-name-text {
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif !important;
  font-size: 1.18rem !important;
  font-weight: 800 !important;
  color: var(--text-card-title, #0C3E75) !important;
  letter-spacing: 0.01em !important;
  line-height: 1.12 !important;
}

[data-theme="dark"] .post-header-editorial.has-post-topbar .author-name-text {
  color: #F8FAFC !important;
}

.post-header-editorial.has-post-topbar .author-time-text {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: var(--text-page-muted, #64748B) !important;
  line-height: 1.1 !important;
}

.post-card > .post-title-text,
.post-title-text {
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif !important;
  font-size: 1.28rem !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  text-align: center !important;
  text-wrap: balance !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
  color: var(--text-card-title, #0C3E75) !important;
  margin: 2px 0 6px 0 !important;
  width: 100% !important;
}

[data-theme="dark"] .post-card > .post-title-text,
[data-theme="dark"] .post-title-text {
  color: #F8FAFC !important;
}

.post-body-text {
  font-size: 0.98rem !important;
  line-height: 1.38 !important;
  margin-bottom: 10px !important;
}

.post-user-media-split.img-left {
  flex-direction: row-reverse;
}

.post-tags-row {
  margin-bottom: 8px !important;
  font-size: 0.86rem !important;
  gap: 10px !important;
}

.post-hairline-divider {
  margin: 8px 0 !important;
}

/* Badge de Livro e Tipo de Post nos Cartões do Feed */
.post-book-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.post-book-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.post-book-badge.book-rejuve {
  background: rgba(2, 132, 199, 0.14);
  color: #0284C7;
  border: 1px solid rgba(2, 132, 199, 0.35);
}
[data-theme="dark"] .post-book-badge.book-rejuve {
  color: #38BDF8;
}

.post-book-badge.book-dating {
  background: rgba(219, 39, 119, 0.14);
  color: #DB2777;
  border: 1px solid rgba(219, 39, 119, 0.35);
}
[data-theme="dark"] .post-book-badge.book-dating {
  color: #F472B6;
}

.post-book-badge.book-revolution {
  background: rgba(217, 119, 6, 0.14);
  color: #D97706;
  border: 1px solid rgba(217, 119, 6, 0.35);
}
[data-theme="dark"] .post-book-badge.book-revolution {
  color: #FBBF24;
}

.post-book-badge.book-suggestions {
  background: rgba(139, 92, 246, 0.14);
  color: #7C3AED;
  border: 1px solid rgba(139, 92, 246, 0.35);
}
[data-theme="dark"] .post-book-badge.book-suggestions {
  color: #C4B5FD;
}

.post-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-page-muted, #64748B);
}

/* Cartão Compacto de Plugin Anexado num Post do Feed */
.post-attached-plugin-card {
  margin: 8px 0 10px;
  border-radius: 10px;
  border: 1.5px solid var(--border-card, #CBD5E1);
  background: var(--bg-card-elevated, #F8FAFC);
  overflow: hidden;
}

.post-attached-plugin-body {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.post-attached-plugin-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 180px;
}

.post-attached-plugin-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.post-attached-plugin-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 7px;
  background: #0284C7;
  color: #FFFFFF !important;
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.post-attached-plugin-cta:hover {
  background: #0369A1;
  transform: translateY(-1px);
}

@media (max-width: 680px) {
  .hero-intro-card {
    grid-template-columns: 1fr !important;
    text-align: center !important;
    gap: 6px !important;
  }
  .hero-top-text {
    padding: 10px 14px 4px 14px !important;
    text-align: center !important;
  }
  .hero-top-art {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-left: none !important;
    border-top: 1px solid var(--border-card) !important;
    border-radius: 0 !important;
  }
  .hero-top-art picture {
    width: 100% !important;
    height: auto !important;
  }
  .hero-top-art img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 auto !important;
  }
}

@media (max-width: 640px) {
  .mybook-book-filter-bar {
    padding: 7px 8px;
    gap: 5px;
  }
  .mybook-filter-label-group {
    font-size: 0.78rem;
  }
  .mybook-filter-pills {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .mybook-filter-pill {
    justify-content: flex-start;
    padding: 4px 10px 4px 0;
    font-size: 0.78rem;
  }
  .composer-card {
    padding: 11px 12px 12px 14px !important;
  }
  .composer-form-heading {
    font-size: 0.94rem !important;
    margin-bottom: 8px !important;
  }
  .composer-book-row {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-bottom: 9px;
  }
  .composer-book-field .composer-title-label {
    min-width: 38px !important;
  }
  .composer-book-select {
    font-size: 0.86rem;
    height: 38px;
    padding: 0 8px;
  }
  .composer-title-row {
    margin-bottom: 9px !important;
  }
  .composer-title-input {
    height: 38px !important;
    font-size: 0.88rem !important;
    padding: 0 9px !important;
  }
  .composer-textarea {
    min-height: 68px !important;
    padding: 6px 9px !important;
    font-size: 0.90rem !important;
  }
  .composer-bottom-bar {
    gap: 12px !important;
    row-gap: 10px !important;
    flex-wrap: wrap !important;
  }
  .composer-actions-left,
  .composer-controls-left {
    gap: 12px 16px !important;
    flex-wrap: wrap !important;
    width: auto !important;
  }
  .btn-composer-cmd {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 10px 0 0 !important;
    font-size: 0.90rem !important;
    gap: 6px !important;
    border-radius: 10px !important;
  }
  .btn-publicar {
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 18px !important;
    font-size: 0.94rem !important;
    border-radius: 10px !important;
    width: auto !important;
    margin: 0 0 0 auto !important;
  }
  .composer-plugin-grid {
    grid-template-columns: 1fr;
  }
  .post-attached-plugin-body {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 10px;
  }
  .post-attached-plugin-cta {
    justify-content: center;
    width: 100%;
  }
  .post-card-topbar {
    padding: 0 12px 0 108px !important;
    height: 34px !important;
    min-height: 34px !important;
  }
  .post-card-topbar .post-book-badge {
    font-size: 0.86rem !important;
    gap: 6px !important;
  }
  .post-card-topbar .post-book-badge .cgd-btn-3d-icon {
    height: 40px !important;
    max-width: 46px !important;
    margin: -9px 0 -9px -6px !important;
  }
  .post-header-editorial.has-post-topbar .author-avatar-large {
    width: 82px !important;
    height: 82px !important;
    min-width: 82px !important;
    margin-top: -28px !important;
    margin-left: -2px !important;
  }
  .header-meta-col {
    min-height: 52px !important;
  }
}


/* 16.4. Barra de Comandos Sociais dos Posts (Fiel ao Draft: 3 Colunas Centradas com Ícone em Cima + Texto em Baixo) */
.post-social-bar {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  align-items: center !important;
  justify-items: center !important;
  max-width: 480px !important;
  width: 100% !important;
  margin: 4px auto 6px auto !important;
  padding: 2px 0 !important;
  gap: 16px !important;
}

.post-social-bar .social-left-group {
  display: contents !important;
}

.post-social-bar > div:not(.social-left-group) {
  display: contents !important;
}

/* Oculta qualquer botão antigo de corações duplicado dentro de .post-social-bar */
.post-social-bar .btn-social-like-legacy {
  display: none !important;
}

.post-social-bar .btn-social-action {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  background: transparent !important;
  border: none !important;
  padding: 4px 10px !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, background 0.15s ease !important;
  text-align: center !important;
  color: #163A66 !important;
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif !important;
  font-size: 15.5px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

[data-theme="dark"] .post-social-bar .btn-social-action {
  color: #E2E8F0 !important;
}

.post-social-bar .btn-social-action:hover {
  background: rgba(2, 132, 199, 0.08) !important;
  transform: translateY(-1px) !important;
  color: #0284C7 !important;
}

[data-theme="dark"] .post-social-bar .btn-social-action:hover {
  background: rgba(56, 189, 248, 0.12) !important;
  color: #38BDF8 !important;
}

.post-social-bar .btn-social-action.saved {
  color: #D97706 !important;
}

.post-social-bar .btn-social-action.comments-open {
  color: #0284C7 !important;
  background: rgba(2, 132, 199, 0.10) !important;
}

.post-social-bar .social-cmd-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 34px !important;
  font-size: 21px !important;
  line-height: 1 !important;
  overflow: visible !important;
}

.post-social-bar .social-cmd-icon .cgd-btn-3d-icon {
  height: 36px !important;
  max-width: 42px !important;
  margin: -4px 0 !important;
}

.post-social-bar .social-cmd-label {
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif !important;
  font-size: 15.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em !important;
  white-space: nowrap !important;
}

@media (max-width: 820px) {
  .post-social-bar {
    gap: 14px !important;
    margin: 6px auto 8px auto !important;
  }
  .post-social-bar .btn-social-action {
    flex-direction: row !important;
    height: 44px !important;
    min-height: 44px !important;
    width: 100% !important;
    padding: 0 12px !important;
    gap: 6px !important;
    background: #DEE5F0 !important;
    border: 1.5px solid #B6C6DB !important;
    border-radius: 12px !important;
  }
  [data-theme="dark"] .post-social-bar .btn-social-action {
    background: #1A2438 !important;
    border-color: #64748B !important;
  }
  .post-social-bar .social-cmd-icon {
    height: 44px !important;
  }
  .post-social-bar .social-cmd-icon .cgd-btn-3d-icon {
    height: 48px !important;
    max-width: 56px !important;
    margin: -6px 0 !important;
  }
  .post-social-bar .btn-cmd-share .social-cmd-label,
  .post-social-bar .btn-cmd-save .social-cmd-label {
    display: none !important;
  }
}

html.is-mobile-device .post-social-bar,
.post-social-bar.cgd-mobile-obj {
  gap: 14px !important;
}

html.is-mobile-device .post-social-bar .btn-social-action,
.post-social-bar.cgd-mobile-obj .btn-social-action {
  flex-direction: row !important;
  height: 44px !important;
  min-height: 44px !important;
  width: 100% !important;
  padding: 0 12px !important;
  gap: 6px !important;
  background: #DEE5F0 !important;
  border: 1.5px solid #B6C6DB !important;
  border-radius: 12px !important;
}

html.is-mobile-device .post-social-bar .btn-cmd-share .social-cmd-label,
html.is-mobile-device .post-social-bar .btn-cmd-save .social-cmd-label,
.post-social-bar.cgd-mobile-obj .btn-cmd-share .social-cmd-label,
.post-social-bar.cgd-mobile-obj .btn-cmd-save .social-cmd-label {
  display: none !important;
}

/* 16.5. Gaveta Interativa de Comentários nos Posts (.post-comments-drawer)
         Ocupa 100% da largura horizontal do post (zero "espaço do espaço" / desperdício lateral),
         e cada comentário individual tem a sua própria barra de votação colada na base. */
.post-comments-drawer {
  display: none;
  margin-top: 6px !important;
  margin-bottom: 0 !important;
  margin-left: calc(-1 * var(--card-pad-x, 14px)) !important;
  margin-right: calc(-1 * var(--card-pad-x, 14px)) !important;
  width: calc(100% + (2 * var(--card-pad-x, 14px))) !important;
  padding: 10px var(--card-pad-x, 14px) 12px var(--card-pad-x, 14px) !important;
  border-radius: 0 !important;
  background: rgba(255, 255, 255, 0.72) !important;
  border-top: 1.5px solid #B6C6DB !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
  box-sizing: border-box !important;
}

.post-comments-drawer.open {
  display: block;
  animation: modalFadeIn 0.2s ease;
}

[data-theme="dark"] .post-comments-drawer {
  background: rgba(15, 23, 42, 0.78) !important;
  border-top-color: #334155 !important;
}

.post-comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0C3E75;
}

[data-theme="dark"] .post-comments-header {
  color: #38BDF8;
}

.post-comments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  margin-bottom: 10px;
  width: 100%;
}

.post-comment-item {
  background: #FFFFFF;
  border: 1.5px solid #B6C6DB;
  border-radius: 10px;
  padding: 8px 12px 0 12px !important;
  font-size: 0.89rem;
  line-height: 1.38;
  color: #1E293B;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

[data-theme="dark"] .post-comment-item {
  background: #1E293B;
  border-color: #334155;
  color: #E2E8F0;
}

.post-comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 0.80rem;
  font-weight: 800;
  color: #0284C7;
  margin-bottom: 3px;
}

[data-theme="dark"] .post-comment-meta {
  color: #38BDF8;
}

.post-comment-time {
  font-weight: 600;
  color: #64748B;
}

.post-comment-body {
  padding-bottom: 6px;
}

/* Barra de votação colada na base de cada comentário (compacta na horizontal para caber perfeitamente) */
.post-comment-item > .plugin-vote-bar {
  margin-top: 2px !important;
  margin-left: -12px !important;
  margin-right: -12px !important;
  margin-bottom: 0 !important;
  width: calc(100% + 24px) !important;
  padding: 5px 10px !important;
  border-top: 1px solid #CBD5E1 !important;
  border-radius: 0 !important;
  background: #F8FAFC !important;
  gap: 6px !important;
}

[data-theme="dark"] .post-comment-item > .plugin-vote-bar {
  background: #0F172A !important;
  border-top-color: #334155 !important;
}

.post-comment-form {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.post-comment-input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1.5px solid #94A3B8;
  background: #FFFFFF;
  color: #0F172A;
  font-family: 'Fira Sans', sans-serif;
  font-size: 0.88rem;
  outline: none;
}

.post-comment-input:focus {
  border-color: #0284C7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

[data-theme="dark"] .post-comment-input {
  background: #0F172A;
  border-color: #475569;
  color: #F8FAFC;
}

.post-comment-submit {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #0284C7, #00A3FF);
  color: #FFFFFF;
  font-family: 'Fira Sans Condensed', sans-serif;
  font-size: 0.90rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease;
}

.post-comment-submit:hover {
  transform: translateY(-1px);
}

/* ==========================================================================
 * Botão Interativo de Língua Original nos Posts Traduzidos (myBOOK)
 * Mostra a bandeira 3D da língua original quando o post é visto noutra língua,
 * permitindo alternar instantaneamente entre a tradução e o original.
 * ========================================================================== */
.post-orig-lang-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0 0 8px 0;
  width: 100%;
}

.post-orig-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 7px;
  border-radius: 999px;
  border: 1.5px solid rgba(2, 132, 199, 0.45);
  background: rgba(2, 132, 199, 0.08);
  color: var(--text-card-title, #0C3E75);
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 0.80rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
  line-height: 1.2;
}

.post-orig-lang-toggle:hover {
  background: rgba(2, 132, 199, 0.16);
  border-color: #00A3FF;
  transform: translateY(-1px);
}

.post-orig-lang-toggle.is-showing-original {
  background: rgba(245, 158, 11, 0.14);
  border-color: #F59E0B;
  color: #B45309;
}

[data-theme="dark"] .post-orig-lang-toggle {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.45);
  color: #E0F2FE;
}

[data-theme="dark"] .post-orig-lang-toggle.is-showing-original {
  background: rgba(245, 158, 11, 0.22);
  border-color: #FBBF24;
  color: #FDE68A;
}

.post-orig-lang-toggle .orig-flag-icon {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

/* ==========================================================================
 * MÓDULO 07: 07_vote_bar_appendix.css
 * Responsabilidade: Sistema Universal de Colagem da Box de Votação como Apêndice
 * (.plugin-vote-bar, .has-docked-vote-bar) com ~1.5mm de altura vertical,
 * corações interativos, contador central e caixa de voto com X azul esferográfica.
 * ========================================================================== */

/* 16.6. Sistema Universal de Colagem da Box de Votação (.plugin-vote-bar / .has-docked-vote-bar)
         - Reduzida em altura com exatamente ~1.5 mm (6px) em cima e em baixo;
         - O objeto onde a votação é colada em baixo nunca tem cantos arredondados separados da votação;
         - A box de votação nunca tem cantos arredondados em cima (0 0), apenas em baixo,
           ocupando 100% da largura horizontal do cartão pai sem bordas laterais duplicadas. */
.has-docked-vote-bar,
.post-card,
.post-comment-item,
.plugin-card,
.quiz-card,
.game-hero-box {
  overflow: hidden !important;
}

/* Garantir que os Posts e a stream myBOOK ocupam 100% da mancha horizontal sem desperdício */
.mybook-stream-container {
  max-width: var(--cgd-mancha-max, 880px) !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.post-card,
.composer-card {
  width: 100% !important;
  max-width: var(--cgd-mancha-max, 880px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   OBJETOS DE VOTAÇÃO DESKTOP (.cgd-desktop-obj) & MOBILE (.cgd-mobile-obj)
   Rigorosamente numa única linha (flex-wrap: nowrap !important) com as
   dimensões aprovadas do CSS original (suite/rejuve/css/page-1.css):
   - Desktop (.cgd-desktop-obj): padding 9px 18px, corações 16x16px, texto 14.5px, quadrado [X] 19x19px.
   - Mobile (.cgd-mobile-obj / <= 820px): 1 única linha horizontal sem quebra,
     sem "/ 6.0" redundante para dar espaço a 6 corações grandes e fáceis de
     tocar com o dedo (28x32px de área de toque, ícone 20x20px), contador central
     legível (14px) e botão Votar [X] amplo (quadrado 21x21px).
   ========================================================================== */
.plugin-vote-bar,
.card-vote-bar {
  background: #FFFFFF !important;
  border: none !important;
  border-top: 1.5px solid #B6C6DB !important;
  border-radius: 0 !important;
  padding: 9px 18px !important;
  min-height: 0 !important;
  line-height: 1 !important;
  margin: 0 !important;
  margin-top: auto !important;
  width: 100% !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  box-sizing: border-box !important;
  box-shadow: none !important;
  position: relative !important;
  z-index: 2 !important;
}

[data-theme="dark"] .plugin-vote-bar,
[data-theme="dark"] .card-vote-bar {
  background: #0B1325 !important;
  border-top-color: #334155 !important;
}

.vote-bar-hearts-score {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.vote-hearts-list {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3.5px !important;
}

.btn-vote-heart {
  background: transparent !important;
  border: none !important;
  padding: 2px !important;
  margin: 0 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.btn-vote-heart:hover {
  transform: scale(1.25) !important;
}

.heart-svg {
  width: 16px !important;
  height: 16px !important;
  display: block !important;
  transition: fill 0.15s ease, stroke 0.15s ease, filter 0.15s ease !important;
}

.btn-vote-heart.active .heart-svg {
  fill: #EF4444 !important;
  stroke: #DC2626 !important;
  stroke-width: 0.5px !important;
  filter: drop-shadow(0 1px 2px rgba(239, 68, 68, 0.35)) !important;
}

.btn-vote-heart.inactive .heart-svg {
  fill: #E2E8F0 !important;
  stroke: #94A3B8 !important;
  stroke-width: 0.9px !important;
}

[data-theme="dark"] .btn-vote-heart.inactive .heart-svg {
  fill: #1E293B !important;
  stroke: #475569 !important;
}

.vote-bar-hearts-score .vote-score-val {
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: #0C3E75 !important;
  white-space: nowrap !important;
  user-select: none !important;
  line-height: 1 !important;
}

.vote-bar-hearts-score .vote-score-val strong {
  font-weight: 900 !important;
  color: #0C3E75 !important;
}

[data-theme="dark"] .vote-bar-hearts-score .vote-score-val,
[data-theme="dark"] .vote-bar-hearts-score .vote-score-val strong {
  color: #F8FAFC !important;
}

.vote-bar-count {
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #0C3E75 !important;
  white-space: nowrap !important;
  text-align: center !important;
  flex-grow: 1 !important;
  user-select: none !important;
  line-height: 1 !important;
}

[data-theme="dark"] .vote-bar-count {
  color: #94A3B8 !important;
}

.btn-vote-toggle-box {
  background: transparent !important;
  border: none !important;
  padding: 2px 4px !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  user-select: none !important;
  flex-shrink: 0 !important;
  border-radius: 6px !important;
  line-height: 1 !important;
}

.vote-toggle-label {
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif !important;
  font-size: 14.5px !important;
  font-weight: 800 !important;
  color: #0C3E75 !important;
  line-height: 1 !important;
}

[data-theme="dark"] .vote-toggle-label {
  color: #38BDF8 !important;
}

.vote-checkbox-square {
  width: 19px !important;
  height: 19px !important;
  border: 1.8px solid #0C3E75 !important;
  border-radius: 3.5px !important;
  background: #FFFFFF !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

[data-theme="dark"] .vote-checkbox-square {
  border-color: #38BDF8 !important;
  background: #0B1325 !important;
}

.vote-check-x-svg {
  width: 13px !important;
  height: 13px !important;
  color: #2563EB !important;
  stroke: #2563EB !important;
  display: none !important;
}

.plugin-vote-bar.has-voted .vote-check-x-svg,
.card-vote-bar.has-voted .vote-check-x-svg {
  display: block !important;
}

.plugin-vote-bar.has-voted .vote-checkbox-square,
.card-vote-bar.has-voted .vote-checkbox-square {
  border-color: #2563EB !important;
}

/* Barra de votação de Post e de Comentário colada à base do cartão como apêndice */
.post-card > .plugin-vote-bar {
  margin-top: 6px !important;
  margin-left: calc(-1 * var(--card-pad-x, 14px)) !important;
  margin-right: calc(-1 * var(--card-pad-x, 14px)) !important;
  margin-bottom: 0 !important;
  width: calc(100% + (2 * var(--card-pad-x, 14px))) !important;
  padding: 8px 14px !important;
  gap: 8px !important;
  border-top: 1.5px solid #B6C6DB !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: none !important;
  border-radius: 0 0 12px 12px !important;
}

.post-comment-item > .plugin-vote-bar {
  padding: 7px 12px !important;
  gap: 8px !important;
  border-radius: 0 0 8px 8px !important;
}

.plugin-card > .plugin-vote-bar,
.quiz-card > .plugin-vote-bar,
.game-hero-box > .plugin-vote-bar,
.service-card > .plugin-vote-bar,
.service-card > .card-vote-bar {
  margin: auto 0 0 0 !important;
  width: 100% !important;
  border-top: 2px solid #0077c8 !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: none !important;
  border-radius: 0 0 16px 16px !important;
}

[data-theme="dark"] .plugin-card > .plugin-vote-bar,
[data-theme="dark"] .quiz-card > .plugin-vote-bar,
[data-theme="dark"] .game-hero-box > .plugin-vote-bar,
[data-theme="dark"] .service-card > .plugin-vote-bar,
[data-theme="dark"] .service-card > .card-vote-bar {
  border-top-color: #00A3FF !important;
}

/* Quando colada a qualquer objeto genérico com padding (.has-docked-vote-bar) */
.has-docked-vote-bar > .plugin-vote-bar,
.has-docked-vote-bar > .card-vote-bar {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: none !important;
}

/* ==========================================================================
   OBJETO DE VOTAÇÃO MOBILE (.cgd-mobile-obj / <= 820px) — 1 ÚNICA LINHA
   Sem quebra para duas linhas (flex-wrap: nowrap !important):
   - Oculta "/ 6.0" para libertar espaço horizontal
   - Corações de 20x20px com área de toque de 26x32px
   - Texto e quadrado [X] (21x21px) nos tamanhos grandes originais
   ========================================================================== */
@media (max-width: 820px) {
  .plugin-vote-bar,
  .card-vote-bar,
  .post-card > .plugin-vote-bar,
  .post-comment-item > .plugin-vote-bar {
    flex-wrap: nowrap !important;
    padding: 8px 10px !important;
    gap: 6px !important;
    min-height: 0 !important;
  }

  .vote-bar-hearts-score {
    width: auto !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
  }

  .vote-hearts-list,
  .post-card > .plugin-vote-bar .vote-hearts-list,
  .post-comment-item > .plugin-vote-bar .vote-hearts-list {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
  }

  .btn-vote-heart {
    width: 26px !important;
    height: 30px !important;
    min-width: 24px !important;
    min-height: 28px !important;
    padding: 2px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
  }

  .heart-svg,
  .post-card > .plugin-vote-bar .heart-svg,
  .post-comment-item > .plugin-vote-bar .heart-svg {
    width: 19px !important;
    height: 19px !important;
  }

  .vote-bar-hearts-score .vote-score-val,
  .post-card > .plugin-vote-bar .vote-bar-hearts-score .vote-score-val,
  .post-comment-item > .plugin-vote-bar .vote-bar-hearts-score .vote-score-val {
    font-size: 14.5px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    min-width: 0 !important;
    box-shadow: none !important;
  }

  /* Em mobile, oculta "/ 6.0" para caber tudo folgadamente numa única linha */
  .vote-bar-hearts-score .vote-score-val > span {
    display: none !important;
  }

  .vote-bar-count,
  .post-card > .plugin-vote-bar .vote-bar-count,
  .post-comment-item > .plugin-vote-bar .vote-bar-count {
    font-size: 13.5px !important;
    text-align: center !important;
    padding: 0 2px !important;
    flex-grow: 1 !important;
  }

  .btn-vote-toggle-box {
    min-height: 30px !important;
    height: auto !important;
    padding: 3px 5px !important;
    gap: 5px !important;
    background: transparent !important;
    border: none !important;
  }

  .vote-toggle-label,
  .post-card > .plugin-vote-bar .vote-toggle-label,
  .post-comment-item > .plugin-vote-bar .vote-toggle-label {
    font-size: 14.5px !important;
  }

  .vote-checkbox-square,
  .post-card > .plugin-vote-bar .vote-checkbox-square,
  .post-comment-item > .plugin-vote-bar .vote-checkbox-square {
    width: 20px !important;
    height: 20px !important;
    border-width: 1.8px !important;
    border-radius: 4px !important;
  }

  .vote-check-x-svg {
    width: 14px !important;
    height: 14px !important;
  }

  .post-social-bar .social-cmd-label {
    font-size: 14px !important;
  }
  .post-comment-form {
    flex-direction: column;
    align-items: stretch;
  }
  .post-comment-submit {
    width: 100%;
  }
}

/* Reforço explícito via classe .is-mobile-device / .cgd-mobile-obj (1 ÚNICA LINHA) */
html.is-mobile-device .plugin-vote-bar,
html.is-mobile-device .card-vote-bar,
.plugin-vote-bar.cgd-mobile-obj,
.card-vote-bar.cgd-mobile-obj {
  flex-wrap: nowrap !important;
  padding: 8px 10px !important;
  gap: 6px !important;
  min-height: 0 !important;
}

html.is-mobile-device .vote-bar-hearts-score,
.plugin-vote-bar.cgd-mobile-obj .vote-bar-hearts-score,
.card-vote-bar.cgd-mobile-obj .vote-bar-hearts-score {
  width: auto !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

html.is-mobile-device .vote-hearts-list,
.plugin-vote-bar.cgd-mobile-obj .vote-hearts-list,
.card-vote-bar.cgd-mobile-obj .vote-hearts-list {
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
}

html.is-mobile-device .btn-vote-heart,
.plugin-vote-bar.cgd-mobile-obj .btn-vote-heart,
.card-vote-bar.cgd-mobile-obj .btn-vote-heart {
  width: 26px !important;
  height: 30px !important;
  min-width: 24px !important;
  min-height: 28px !important;
  padding: 2px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 6px !important;
}

html.is-mobile-device .heart-svg,
.plugin-vote-bar.cgd-mobile-obj .heart-svg,
.card-vote-bar.cgd-mobile-obj .heart-svg {
  width: 19px !important;
  height: 19px !important;
}

html.is-mobile-device .vote-bar-hearts-score .vote-score-val > span,
.plugin-vote-bar.cgd-mobile-obj .vote-bar-hearts-score .vote-score-val > span,
.card-vote-bar.cgd-mobile-obj .vote-bar-hearts-score .vote-score-val > span {
  display: none !important;
}

html.is-mobile-device .vote-bar-count,
.plugin-vote-bar.cgd-mobile-obj .vote-bar-count,
.card-vote-bar.cgd-mobile-obj .vote-bar-count {
  font-size: 13.5px !important;
  text-align: center !important;
  padding: 0 2px !important;
  flex-grow: 1 !important;
}

html.is-mobile-device .btn-vote-toggle-box,
.plugin-vote-bar.cgd-mobile-obj .btn-vote-toggle-box,
.card-vote-bar.cgd-mobile-obj .btn-vote-toggle-box {
  min-height: 30px !important;
  height: auto !important;
  padding: 3px 5px !important;
  gap: 5px !important;
  background: transparent !important;
  border: none !important;
}

html.is-mobile-device .vote-checkbox-square,
.plugin-vote-bar.cgd-mobile-obj .vote-checkbox-square,
.card-vote-bar.cgd-mobile-obj .vote-checkbox-square {
  width: 20px !important;
  height: 20px !important;
  border-width: 1.8px !important;
  border-radius: 4px !important;
}

html.is-mobile-device .vote-check-x-svg,
.plugin-vote-bar.cgd-mobile-obj .vote-check-x-svg,
.card-vote-bar.cgd-mobile-obj .vote-check-x-svg {
  width: 14px !important;
  height: 14px !important;
}

/* ==========================================================================
   MÓDULO 08: 08_medal_wallet.css
   Responsabilidade: Carteira Digital myMEDAL (myM) (Web3 / SHA-256 Ledger),
   Botão de Carteira no Header ((logo myM) Wallet com arredondamento 10px igual aos restantes botões),
   Modal da Carteira com Ilustrações 3D Premium Deluxe, Configuração de Perfil/Selfie/Privacidade,
   Quadro de Honra/Utilizadores Mais Ativos, Banner de Recompensa e Limite Semanal.
   ========================================================================== */

.cgd-medal-wallet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  gap: 6px;
  padding: 0 11px 0 0 !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 55%, #F59E0B 100%);
  border: 1.5px solid #D97706;
  color: #78350F;
  font-family: 'Fira Sans Condensed', 'Fira Sans', var(--font-main, 'Plus Jakarta Sans', sans-serif);
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  white-space: nowrap;
  box-sizing: border-box;
  overflow: visible !important;
  position: relative;
}

.cgd-medal-wallet-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  filter: brightness(1.03);
}

.cgd-medal-wallet-btn.medal-pulse {
  animation: cgdMedalPulseAnim 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cgdMedalPulseAnim {
  0% { transform: scale(1); }
  40% { transform: scale(1.13); box-shadow: 0 0 18px rgba(245, 158, 11, 0.75); }
  100% { transform: scale(1); }
}

.cgd-medal-coin-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  overflow: visible !important;
}

.cgd-medal-coin-icon img,
.cgd-medal-wallet-btn .cgd-btn-3d-icon {
  height: 43px !important;
  width: auto !important;
  max-width: 52px !important;
  margin: -8px 0 -8px -9px !important;
  transform: translateY(-0.5px);
  object-fit: contain !important;
  filter: drop-shadow(0 2.5px 4px rgba(120, 53, 15, 0.42)) !important;
}

/* Estágio A2 (<= 680px): oculta texto mantendo 36px de altura e width: auto */
@media (max-width: 680px) {
  .cgd-medal-wallet-btn .cgd-medal-label-text {
    display: none !important;
  }

  .top-controls > .control-dropdown > .cgd-medal-wallet-btn,
  .cgd-medal-wallet-btn {
    padding: 0 7px !important;
    gap: 0 !important;
  }

  .cgd-medal-coin-icon img,
  .cgd-medal-wallet-btn .cgd-btn-3d-icon {
    margin: -8px 0 !important;
  }
}

/* Estágio C (<= 560px): Smartphone Portrait Compacto — sincronizado a 40px e ícone 45px */
@media (max-width: 560px) {
  .top-controls > .control-dropdown > .cgd-medal-wallet-btn,
  .cgd-medal-wallet-btn {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 54px !important;
    padding: 0 4px !important;
    gap: 0 !important;
    border-radius: 10px !important;
    flex-shrink: 1 !important;
    justify-content: center !important;
  }

  .cgd-medal-wallet-btn .cgd-medal-label-text {
    display: none !important;
  }

  .cgd-medal-coin-icon img,
  .cgd-medal-wallet-btn .cgd-btn-3d-icon {
    height: 45px !important;
    max-width: 48px !important;
    margin: -7px 0 !important;
  }
}

html.is-mobile-device .top-controls > .control-dropdown > .cgd-medal-wallet-btn,
html.is-mobile-device .cgd-medal-wallet-btn,
.cgd-medal-wallet-btn.cgd-mobile-obj {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 54px !important;
  padding: 0 4px !important;
  gap: 0 !important;
  border-radius: 10px !important;
  flex-shrink: 1 !important;
  justify-content: center !important;
}

html.is-mobile-device .cgd-medal-wallet-btn .cgd-medal-label-text,
.cgd-medal-wallet-btn.cgd-mobile-obj .cgd-medal-label-text {
  display: none !important;
}

html.is-mobile-device .cgd-medal-coin-icon img,
html.is-mobile-device .cgd-medal-wallet-btn .cgd-btn-3d-icon,
.cgd-medal-wallet-btn.cgd-mobile-obj .cgd-btn-3d-icon {
  height: 45px !important;
  max-width: 48px !important;
  margin: -7px 0 !important;
}

/* Estágio B (Telemóvel Horizontal / Landscape <= 540px de altura): sincronizado a 32px e ícone 37px */
@media (orientation: landscape) and (max-height: 540px) {
  .cgd-medal-wallet-btn .cgd-medal-label-text {
    display: none !important;
  }

  .top-controls > .control-dropdown > .cgd-medal-wallet-btn,
  .cgd-medal-wallet-btn {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    width: auto !important;
    min-width: 42px !important;
    max-width: none !important;
    padding: 0 6px !important;
    gap: 0 !important;
    border-radius: 9px !important;
  }

  .cgd-medal-coin-icon img,
  .cgd-medal-wallet-btn .cgd-btn-3d-icon {
    height: 37px !important;
    max-width: 44px !important;
    margin: -6px 0 !important;
  }
}

html.is-landscape-mobile .cgd-medal-wallet-btn .cgd-medal-label-text {
  display: none !important;
}

html.is-landscape-mobile .top-controls > .control-dropdown > .cgd-medal-wallet-btn,
html.is-landscape-mobile .cgd-medal-wallet-btn {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  width: auto !important;
  min-width: 42px !important;
  max-width: none !important;
  padding: 0 6px !important;
  gap: 0 !important;
  border-radius: 9px !important;
}

html.is-landscape-mobile .cgd-medal-coin-icon img,
html.is-landscape-mobile .cgd-medal-wallet-btn .cgd-btn-3d-icon {
  height: 37px !important;
  max-width: 44px !important;
  margin: -6px 0 !important;
}

.cgd-medal-balance-val {
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  color: #78350F;
}

.cgd-medal-mult-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(120, 53, 15, 0.14);
  color: #78350F;
  font-size: 0.68rem;
  font-weight: 800;
}

[data-theme="dark"] .cgd-medal-wallet-btn {
  background: linear-gradient(135deg, #451A03 0%, #78350F 55%, #B45309 100%);
  border-color: #F59E0B;
  color: #FEF3C7;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .cgd-medal-balance-val {
  color: #FDE68A;
}

[data-theme="dark"] .cgd-medal-mult-tag {
  background: rgba(254, 243, 199, 0.16);
  color: #FDE68A;
}

/* Modal da Carteira myMEDAL (myM) — Zero desperdício de espaço lateral (<= 1.5mm / 5px) e sem traço separador antes das caixas arredondadas */
.cgd-medal-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5px !important;
  box-sizing: border-box;
}

.cgd-medal-modal-overlay.open {
  display: flex;
}

.cgd-medal-modal-card {
  width: 100%;
  max-width: 870px;
  max-height: 94vh;
  overflow-y: auto;
  background: var(--bg-card, #FFFFFF);
  color: var(--text-page, #0F172A);
  border-radius: 16px;
  border: 2px solid #F59E0B;
  box-shadow: 0 26px 65px rgba(15, 23, 42, 0.5);
  padding: 10px 5px 8px 5px !important;
  position: relative;
  box-sizing: border-box;
}

[data-theme="dark"] .cgd-medal-modal-card {
  background: #0F172A;
  color: #F8FAFC;
  border-color: #D97706;
}

/* Cabeçalho Centrado com Medalha 3D Grande à Esquerda e Título em 2 Linhas (SEM traço separador) */
.cgd-medal-modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: none !important;
  padding-bottom: 4px !important;
  margin-bottom: 6px !important;
  position: relative;
}

.cgd-medal-header-center-unit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 auto 8px auto;
}

.cgd-medal-hero-3d-img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 16px rgba(217, 119, 6, 0.42));
}

.cgd-medal-title-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.08;
}

.cgd-medal-title-kicker {
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-page-muted, #64748B);
  margin-bottom: 3px;
}

[data-theme="dark"] .cgd-medal-title-kicker {
  color: #CBD5E1;
}

.cgd-medal-title-main {
  font-size: 1.72rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #B45309;
}

.cgd-medal-title-main .brand-my {
  color: var(--text-page, #0F172A);
}

.cgd-medal-title-main .brand-medal {
  color: #D97706;
}

.cgd-medal-title-main .brand-ticker {
  color: #0284C7;
  font-weight: 900;
}

[data-theme="dark"] .cgd-medal-title-main {
  color: #FBBF24;
}

[data-theme="dark"] .cgd-medal-title-main .brand-my {
  color: #F8FAFC;
}

[data-theme="dark"] .cgd-medal-title-main .brand-medal {
  color: #FBBF24;
}

[data-theme="dark"] .cgd-medal-title-main .brand-ticker {
  color: #38BDF8;
}

.cgd-medal-close-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.12);
  color: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
}

/* Manifesto Experiência Viva — Livro PREPARADO: para a próxima revolução */
.cgd-medal-vision-banner {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(245, 158, 11, 0.12) 100%);
  border: 1.5px solid rgba(14, 165, 233, 0.35);
  border-radius: 12px;
  padding: 9px 10px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-size: 0.82rem;
  line-height: 1.44;
}

.cgd-medal-vision-banner img.cgd-medal-sec-3d {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(14, 165, 233, 0.3));
}

.cgd-medal-book-link {
  font-weight: 900;
  color: #0284C7;
  text-decoration: underline;
  text-underline-offset: 2px;
}

[data-theme="dark"] .cgd-medal-book-link {
  color: #38BDF8;
}

.cgd-medal-hero-grid {
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

@media (max-width: 640px) {
  .cgd-medal-hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Bloco de Saldo Disponível — 100% Centrado */
.cgd-medal-balance-box {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.65) 0%, rgba(253, 230, 138, 0.35) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.6);
  border-radius: 13px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

[data-theme="dark"] .cgd-medal-balance-box {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.42) 0%, rgba(69, 26, 3, 0.5) 100%);
}

.cgd-medal-balance-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-page, #0F172A);
}

[data-theme="dark"] .cgd-medal-balance-kicker {
  color: #F8FAFC;
}

.cgd-medal-big-num {
  font-size: 1.95rem;
  font-weight: 900;
  color: #B45309;
  font-variant-numeric: tabular-nums;
  line-height: 1.12;
  margin: 4px 0;
}

[data-theme="dark"] .cgd-medal-big-num {
  color: #FBBF24;
}

.cgd-medal-plan-line {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.cgd-medal-wallet-key-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-page-muted, #475569);
  margin-top: 2px;
}

[data-theme="dark"] .cgd-medal-wallet-key-label {
  color: #CBD5E1;
}

.cgd-medal-guest-only-reg {
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 2px;
}

.cgd-medal-reg-extrabold-link {
  font-weight: 900;
  color: #0284C7;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cgd-medal-reg-extrabold-link:hover {
  color: #0369A1;
}

[data-theme="dark"] .cgd-medal-reg-extrabold-link {
  color: #38BDF8;
}

.cgd-medal-addr-pill {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.07);
  font-family: monospace;
  font-size: 0.73rem;
  color: var(--text-page-muted, #475569);
  word-break: break-all;
}

[data-theme="dark"] .cgd-medal-addr-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
}

.cgd-medal-stats-mini {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.cgd-medal-stat-tile {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cgd-medal-stat-tile img.cgd-medal-tile-3d {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 5px rgba(15, 23, 42, 0.22));
}

.cgd-medal-stat-tile-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.cgd-medal-stat-tile strong {
  font-size: 1.08rem;
  font-weight: 900;
}

.cgd-medal-stat-tile span {
  font-size: 0.73rem;
  color: var(--text-page-muted, #64748B);
}

.cgd-medal-section-title {
  font-size: 0.95rem;
  font-weight: 900;
  margin: 15px 0 9px 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.cgd-medal-section-title img.cgd-medal-sec-3d {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.25));
}

.cgd-medal-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.cgd-medal-rule-card {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.78rem;
  line-height: 1.38;
}

.cgd-medal-rule-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.cgd-medal-rule-card-head img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.cgd-medal-rule-card strong {
  font-size: 0.84rem;
  color: #B45309;
}

[data-theme="dark"] .cgd-medal-rule-card strong {
  color: #FBBF24;
}

.cgd-medal-weekly-bar-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 14px;
  font-size: 0.81rem;
  line-height: 1.42;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cgd-medal-weekly-bar-box img.cgd-medal-sec-3d {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.cgd-medal-weekly-bar-box.is-capped {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.5);
}

.cgd-medal-tx-list,
.cgd-medal-lb-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.cgd-medal-tx-row,
.cgd-medal-lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 0.81rem;
}

.cgd-medal-lb-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.cgd-medal-lb-rank {
  font-size: 1.08rem;
  font-weight: 900;
  color: #D97706;
  min-width: 18px;
  display: inline-block;
}

[data-theme="dark"] .cgd-medal-lb-rank {
  color: #FBBF24;
}

.cgd-medal-lb-name {
  font-weight: 800;
  color: var(--text-page, #0F172A);
}

[data-theme="dark"] .cgd-medal-lb-name {
  color: #F8FAFC;
}

.cgd-medal-lb-plan {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-page-muted, #64748B);
}

.cgd-medal-tx-hash {
  font-family: monospace;
  font-size: 0.7rem;
  color: var(--text-page-muted, #64748B);
}

.cgd-medal-tx-amount {
  font-weight: 800;
  color: #059669;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cgd-medal-tx-amount img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.cgd-medal-tx-amount.is-negative {
  color: #DC2626;
}

/* Banner de Medalhas dentro do Modal de Resultados dos Jogos */
.game-medal-reward-banner {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.85) 0%, rgba(253, 230, 138, 0.65) 100%);
  border: 1.5px solid #F59E0B;
  color: #78350F;
  font-size: 0.84rem;
  line-height: 1.42;
  text-align: left;
}

.game-medal-reward-banner.limit-warning {
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.8) 0%, rgba(254, 243, 199, 0.8) 100%);
  border-color: #D97706;
  color: #7C2D12;
}

[data-theme="dark"] .game-medal-reward-banner {
  background: rgba(120, 53, 15, 0.42);
  color: #FEF3C7;
  border-color: #F59E0B;
}

/* ==========================================================================
   Secção de Configuração do Utilizador (Nome/Nickname, Selfie/Foto, Anónimo e Mascarar Ganhos ****)
   ========================================================================== */
.cgd-medal-settings-card {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.1) 0%, rgba(245, 158, 11, 0.08) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.42);
  border-radius: 15px;
  padding: 15px 16px;
  margin-bottom: 16px;
  text-align: left;
}

[data-theme="dark"] .cgd-medal-settings-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(120, 53, 15, 0.28) 100%);
  border-color: rgba(245, 158, 11, 0.48);
}

.cgd-medal-settings-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}

@media (max-width: 620px) {
  .cgd-medal-settings-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

.cgd-medal-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cgd-medal-avatar-frame {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 2.5px solid #F59E0B;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
  position: relative;
}

.cgd-medal-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cgd-medal-avatar-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.cgd-medal-cam-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid #D97706;
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  color: #78350F;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.cgd-medal-cam-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

[data-theme="dark"] .cgd-medal-cam-btn {
  background: linear-gradient(135deg, #78350F 0%, #B45309 100%);
  border-color: #F59E0B;
  color: #FEF3C7;
}

.cgd-medal-fields-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.cgd-medal-input-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.cgd-medal-input-row label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-page, #0F172A);
}

[data-theme="dark"] .cgd-medal-input-row label {
  color: #F8FAFC;
}

.cgd-medal-nick-input {
  width: 100%;
  padding: 8px 11px;
  border-radius: 9px;
  border: 1.5px solid rgba(148, 163, 184, 0.45);
  background: var(--bg-card, #FFFFFF);
  color: var(--text-page, #0F172A);
  font-size: 0.85rem;
  font-weight: 700;
  box-sizing: border-box;
}

[data-theme="dark"] .cgd-medal-nick-input {
  background: #1E293B;
  color: #F8FAFC;
  border-color: #475569;
}

.cgd-medal-toggles-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
}

.cgd-medal-check-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
}

.cgd-medal-check-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: #D97706;
  cursor: pointer;
  flex-shrink: 0;
}

.cgd-medal-save-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.cgd-medal-save-btn {
  padding: 7px 15px;
  border-radius: 9px;
  border: 1.5px solid #D97706;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  font-size: 0.81rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35);
}

.cgd-medal-save-btn:hover {
  filter: brightness(1.06);
}

/* Câmara de Selfie Ao Vivo (WebRTC) */
.cgd-medal-camera-box {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  border: 1.5px solid #F59E0B;
  color: #F8FAFC;
}

.cgd-medal-camera-box.active {
  display: flex;
}

.cgd-medal-camera-video {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #FBBF24;
  transform: scaleX(-1);
  background: #000;
}

.cgd-medal-lb-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #F59E0B;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Micro-Toast Flutuante de Mineração PoW (Quando o utilizador ganha myM em qualquer página) */
.cgd-mining-floating-toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(440px, calc(100vw - 24px));
  padding: 10px 14px;
  border-radius: 14px;
  background: #0F172A;
  border: 2px solid #F59E0B;
  color: #F8FAFC;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 18px rgba(245, 158, 11, 0.25);
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.cgd-mining-floating-toast.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cgd-mining-toast-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 5px rgba(245, 158, 11, 0.45));
}

.cgd-mining-toast-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.cgd-mining-toast-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #FDE68A;
  line-height: 1.25;
}

.cgd-mining-toast-meta {
  font-size: 0.72rem;
  color: #CBD5E1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.cgd-mining-toast-link {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #0F172A !important;
  font-size: 0.76rem;
  font-weight: 900;
  text-decoration: none !important;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .cgd-mining-floating-toast {
    left: 12px;
    right: 12px;
    bottom: 14px;
    padding: 9px 11px;
  }
}

/* ==========================================================================
 * MÓDULO 09: 09_book_video_player.css
 * Responsabilidade: Toggle ("Ver/Esconder Anúncio em vídeo"), Drawer Embutido
 * nos cartões do Portal e páginas de livro, e Leitor de Vídeo Minimalista
 * (orientação dinâmica 16:9 / 9:16 estável ao scroll, 100% largura sem barras
 * negras em retrato e WCAG AAA compliant).
 * ========================================================================== */

.cgd-video-ad-toggle {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  padding: 3px 10px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.90rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  color: #0369A1;
  cursor: pointer;
  line-height: 1.3;
  border-radius: 6px;
  transition: color 0.18s ease, background-color 0.18s ease;
}

[data-theme="dark"] .cgd-video-ad-toggle {
  color: #38BDF8;
}

.cgd-video-ad-toggle:hover,
.cgd-video-ad-toggle:focus-visible {
  background-color: rgba(2, 132, 199, 0.10);
  outline: none;
}

.cgd-video-ad-toggle[hidden],
.cgd-video-ad-drawer[hidden],
.cgd-standalone-video-ad[hidden] {
  display: none !important;
}

.cgd-video-ad-tri {
  width: 0.72em;
  height: 0.72em;
  flex-shrink: 0;
  display: inline-block;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.cgd-video-ad-toggle[aria-expanded="true"] .cgd-video-ad-tri {
  transform: rotate(180deg);
}

/* Integração nos cartões do Portal */
.service-card .card-footer {
  gap: 6px;
  padding: 11px 18px 12px;
}

.service-card.has-open-video-ad .card-footer {
  padding-bottom: 9px;
}

.service-card > .cgd-video-ad-drawer {
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: #040711;
  border-top: 1px solid rgba(15, 23, 42, 0.22);
  position: relative;
  z-index: 5;
  cursor: default;
}

.service-card.has-open-video-ad > .plugin-vote-bar,
.service-card.has-open-video-ad > .card-vote-bar {
  margin-top: 0 !important;
}

/* Host autónomo abaixo da capa nas páginas de cada livro (/rejuve, /dating, /revolution) */
.cgd-standalone-video-ad {
  max-width: 880px;
  margin: 6px auto 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cgd-standalone-video-ad .cgd-video-ad-drawer {
  width: 100%;
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(14, 116, 144, 0.28);
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.28);
  background-color: #040711;
}

/* Leitor Minimalista (16:9 Horizontal / 9:16 Vertical sem barras negras) */
.cgd-min-player {
  position: relative;
  background-color: #040711;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  outline: none;
}

.cgd-min-player.is-landscape {
  width: 100%;
  max-width: calc(82vh * 16 / 9);
  max-width: calc(82svh * 16 / 9);
  max-height: 82vh;
  max-height: 82svh;
  aspect-ratio: 16 / 9;
}

.cgd-min-player.is-portrait {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 9 / 16;
}

.cgd-min-player.is-mynews-player {
  width: 100%;
  max-width: 100%;
  max-height: none;
  aspect-ratio: 16 / 9;
}

.cgd-min-player:fullscreen,
.cgd-min-player:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: auto !important;
}

.cgd-min-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background-color: #040711;
  cursor: pointer;
}

.cgd-min-player.is-portrait .cgd-min-video {
  object-fit: cover;
}

.cgd-min-player:fullscreen .cgd-min-video,
.cgd-min-player:-webkit-full-screen .cgd-min-video {
  object-fit: contain;
}

.cgd-min-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background-color: #040711;
}

.cgd-min-bigplay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background-color: rgba(4, 10, 28, 0.88);
  border: 3px solid rgba(255, 255, 255, 0.94);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.18s ease;
}

.cgd-min-bigplay:hover,
.cgd-min-bigplay:focus-visible {
  background-color: rgba(2, 132, 199, 0.95);
  transform: translate(-50%, -50%) scale(1.08);
  outline: none;
}

.cgd-min-bigplay svg {
  width: 44px;
  height: 44px;
  display: block;
  transform: translateX(3px);
}

.cgd-min-player.is-playing .cgd-min-bigplay,
.cgd-min-player.has-started .cgd-min-bigplay {
  opacity: 0;
  pointer-events: none;
}

/* Barra Inferior Unmistakable & Mobile-Large */
.cgd-min-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 16px 16px 12px;
  background-color: rgba(2, 6, 18, 0.84);
  background-image: linear-gradient(
    to top,
    rgba(2, 6, 18, 0.96) 0%,
    rgba(2, 6, 18, 0.80) 68%,
    rgba(2, 6, 18, 0.18) 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: opacity 0.25s ease;
}

.cgd-min-player.is-playing.is-idle .cgd-min-controls {
  opacity: 0;
  pointer-events: none;
}

.cgd-min-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cgd-min-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cgd-min-btn {
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(15, 23, 42, 0.78);
  border: 2px solid rgba(255, 255, 255, 0.62);
  color: #FFFFFF;
  width: 52px;
  height: 52px;
  padding: 0;
  margin: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.cgd-min-btn:hover,
.cgd-min-btn:focus-visible {
  background-color: rgba(2, 132, 199, 0.86);
  border-color: #FFFFFF;
  transform: scale(1.04);
  outline: none;
}

.cgd-min-btn.is-active {
  background-color: #0284C7;
  border-color: #FFFFFF;
}

.cgd-min-btn svg {
  width: 32px;
  height: 32px;
  display: block;
}

.cgd-min-time {
  font-family: 'Fira Sans Condensed', 'Fira Sans', sans-serif;
  font-size: 21px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: #FFFFFF;
  background-color: rgba(2, 6, 18, 0.88);
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  padding: 5px 12px;
  border-radius: 9px;
  line-height: 1.2;
  white-space: nowrap;
}

.cgd-min-scrub {
  position: relative;
  width: 100%;
  height: 28px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.cgd-min-scrub-track {
  position: relative;
  width: 100%;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  overflow: visible;
  transition: height 0.14s ease;
}

.cgd-min-scrub:hover .cgd-min-scrub-track,
.cgd-min-scrub.is-dragging .cgd-min-scrub-track {
  height: 12px;
}

.cgd-min-scrub-fill {
  position: relative;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #38BDF8 0%, #FFFFFF 100%);
  border-radius: 999px;
}

.cgd-min-scrub-thumb {
  position: absolute;
  top: 50%;
  right: -11px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: #FFFFFF;
  border: 3px solid #0284C7;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

@media (max-width: 760px) {
  .cgd-min-bigplay {
    width: 80px;
    height: 80px;
  }

  .cgd-min-bigplay svg {
    width: 36px;
    height: 36px;
  }

  .cgd-min-controls {
    padding: 10px 10px 10px;
    gap: 8px;
  }

  .cgd-min-group {
    gap: 6px;
  }

  .cgd-min-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .cgd-min-btn svg {
    width: 26px;
    height: 26px;
  }

  .cgd-min-time {
    font-size: 16px;
    padding: 4px 8px;
  }

  .cgd-min-scrub {
    height: 26px;
  }

  .cgd-min-scrub-track {
    height: 9px;
  }

  .cgd-min-scrub-thumb {
    width: 20px;
    height: 20px;
    right: -10px;
  }
}

