/* ============================================================
   Abba — Estilos Globais
   Reset, tipografia base e utilitários.
   ============================================================ */

/* ── Reset moderno ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--line-height-ui);
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.offline-banner {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 10000;
  transform: translate(-50%, -120%);
  width: min(100%, var(--app-max-width));
  padding: 8px var(--space-md);
  text-align: center;
  color: #fff;
  font-size: var(--text-small);
  background: rgba(124, 58, 237, 0.96);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal);
}

body.is-offline .offline-banner {
  transform: translate(-50%, 0);
}

@media (min-width: 768px) {
  .offline-banner {
    width: auto;
    min-width: 260px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }
}

.sw-update-banner {
  position: fixed;
  bottom: calc(var(--nav-height, 64px) + var(--space-sm));
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary-dark);
  color: #fff;
  font-size: var(--text-small);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  animation: sw-banner-in 0.3s ease;
}

@keyframes sw-banner-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Previne scroll horizontal em mobile */
#app {
  max-width: var(--app-max-width);
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  background-color: var(--color-bg);
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

ul, ol {
  list-style: none;
}

/* ── Tipografia utilitária ── */
.text-display  { font-size: var(--text-display);  font-weight: var(--weight-medium); }
.text-title    { font-size: var(--text-title);    font-weight: var(--weight-medium); }
.text-subtitle { font-size: var(--text-subtitle); font-weight: var(--weight-medium); }
.text-body     { font-size: var(--text-body); }
.text-small    { font-size: var(--text-small); }
.text-caption  { font-size: var(--text-caption); }
.text-micro    { font-size: var(--text-micro); font-weight: var(--weight-medium); text-transform: uppercase; letter-spacing: 0.06em; }

.text-primary   { color: var(--color-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary  { color: var(--color-text-tertiary); }
.text-accent    { color: var(--color-accent); }
.text-success   { color: var(--color-success); }
.text-error     { color: var(--color-error); }
.text-center    { text-align: center; }
.text-right     { text-align: right; }

.reading-title,
.reflection-title,
.verse-highlight,
.desktop-panel blockquote,
#desktop-panel blockquote,
.daily-verse-text,
.section-title-main,
.dp-verse-text {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-text); /* contraste garantido em todos os temas — diferenciado só por estilo e tamanho */
}

.verse-card.card-devotional,
.card.card-devotional,
.card-devotional {
  border-left: 3px solid var(--primary, var(--color-primary));
  border-radius: 0 12px 12px 0;
  padding-left: 1.25rem;
}

#home-reading-card .verse-card,
#home-progress .card,
#home-activity .card,
#home-reflection .card {
  padding: 1.5rem;
}

.bible-testament-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--primary, var(--color-primary));
  border: 1px solid var(--primary, var(--color-primary));
  padding: 2px 10px;
  border-radius: 20px;
  background: transparent;
}

.verse-reference,
.verse-card .verse-reference,
.dp-verse-ref,
.dp-passage-ref {
  font-family: var(--font-serif);
  font-style: normal;
  font-size: 0.85em;
  color: var(--primary, var(--color-primary));
  letter-spacing: 0.02em;
  text-transform: none;
  overflow-wrap: anywhere;
}

/* ── Layout utilitário ── */
.container {
  padding: 0 var(--space-md);
}

.flex {
  display: flex;
  align-items: center;
}

.flex       { display: flex; }
.flex-col   { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.flex-1 { flex: 1; }
.w-full { width: 100%; }

.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.pt-sm { padding-top: var(--space-sm); }
.pb-nav { padding-bottom: calc(var(--nav-height) + var(--space-md)); }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }

/* ── Visibilidade ── */
.hidden { display: none !important; }
.invisible { visibility: hidden; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── Página de leitura: texto bíblico ── */
.reading-text {
  font-size: var(--text-body);
  line-height: var(--line-height-reading);
  color: var(--color-text);
}

.reflection-heading {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.reflection-heading.mt-sm {
  margin-top: var(--space-sm);
}

#reading-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#reading-container > * {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#reading-container .verse-card,
#reading-container .card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  position: relative;
  left: auto;
  right: auto;
  transform: none;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* ── Loading spinner ── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.spiritual-loading {
  display: flex;
  min-height: 160px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-md);
  text-align: center;
  padding: var(--space-lg);
}

.spiritual-loading-phrase {
  max-width: 420px;
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  font-style: italic;
  line-height: 1.6;
  opacity: 0;
  transition: opacity 280ms ease;
}

.spiritual-loading-phrase.is-visible {
  opacity: 1;
}

.reflection-audio {
  display: grid;
  gap: var(--space-xs);
  margin: 0 0 var(--space-md);
}

.reflection-audio-top {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.reflection-audio-time {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
  min-width: 7ch;
}

.reflection-audio-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-full);
  background: var(--color-border);
  cursor: pointer;
  touch-action: none;
}

.reflection-audio-progress-fill {
  width: 0;
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  transition: width 160ms linear;
}

.reflection-audio-loading {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  font-style: italic;
  line-height: 1.5;
}

.reflection-audio-loading[hidden] {
  display: none;
}

.reflection-audio-loading .spinner {
  width: 20px;
  height: 20px;
  border-width: 2px;
  flex: 0 0 auto;
}

.reflection-audio-loading p {
  margin: 0;
}

.reflection-paragraph-active {
  background: rgba(124, 92, 191, 0.12);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  margin-left: -6px;
  margin-right: -6px;
  transition: background 0.4s ease;
}

.reflection-playing [data-reflection-paragraph] {
  cursor: pointer;
}

.reflection-tts-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: var(--space-lg);
  background: rgba(0, 0, 0, 0.48);
}

.reflection-tts-dialog {
  position: relative;
  width: min(420px, 100%);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.reflection-tts-dialog h3 {
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.reflection-tts-dialog p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.reflection-tts-actions {
  display: grid;
  gap: var(--space-sm);
}

.reflection-tts-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 22px;
  cursor: pointer;
}

/* Loading de tela cheia (usado no boot do app) */
.loading-full {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  gap: var(--space-md);
  z-index: 9999;
}

.loading-full .app-logo {
  width: 72px;
  height: 84px;
  object-fit: contain;
}

/* ── Divisor ── */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-md) 0;
}

/* ── Seção com título ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.section-header h2 {
  font-size: var(--text-subtitle);
  font-weight: var(--weight-medium);
}

/* ================================================================
   SIDEBAR RESPONSIVO (DESKTOP)
   ================================================================ */

.app-sidebar {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  height: 100dvh;
  width: 200px;
  background: var(--color-bg);
  border-right: 1px solid var(--color-border);
  flex-direction: column;
  z-index: 99;
  transition: width 0.25s ease;
  overflow-x: hidden;
  overflow-y: auto;
}

.app-sidebar[data-collapsed="true"] {
  width: 48px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.sidebar-logo {
  width: 32px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  color: var(--color-primary); /* currentColor no SVG inline adapta ao tema */
}

.app-sidebar[data-collapsed="true"] .sidebar-logo {
  display: none;
}

.sidebar-toggle {
  padding: 6px 8px;
  font-size: 18px;
  flex-shrink: 0;
}

/* Quando colapsado, centraliza o toggle no header de 48px */
.app-sidebar[data-collapsed="true"] .sidebar-header {
  justify-content: center;
  padding: var(--space-md) 0;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-sm);
  overflow-y: auto;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-item:hover {
  background: var(--color-bg-secondary);
  color: var(--color-text);
}

.sidebar-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: var(--weight-medium);
}

.sidebar-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  color: var(--primary, var(--color-primary));
}

.sidebar-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  overflow: visible;
}

.app-sidebar[data-collapsed="true"] .sidebar-item,
.sidebar-collapsed .nav-item {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0;
  width: 100%;
}

.app-sidebar[data-collapsed="true"] .sidebar-item svg,
.sidebar-collapsed .nav-item svg {
  flex-shrink: 0;
  display: block;
  margin: 0 auto;
}

.sidebar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.app-sidebar[data-collapsed="true"] .sidebar-label {
  display: none;
}

.sidebar-footer {
  padding: var(--space-sm);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

.sidebar-logout {
  width: 100%;
  justify-content: flex-start;
}

.sidebar-logout:hover {
  color: var(--color-error);
  background: rgba(192, 57, 43, 0.08);
}

@media (min-width: 768px) {
  body {
    --sidebar-width: 200px;
  }

  body[data-sidebar-collapsed="true"] {
    --sidebar-width: 48px;
  }

  #app {
    max-width: none;
    margin: 0;
    padding-left: var(--sidebar-width, 200px);
    transition: padding-left 0.25s ease;
  }

  .app-sidebar {
    display: flex;
  }

  .page {
    padding-bottom: var(--space-lg);
  }

  .nav-bar {
    display: none !important;
  }
}

/* ── Page wrapper com padding para a nav ── */
.page {
  padding: var(--space-lg) var(--space-md);
  padding-bottom: calc(var(--nav-height) + var(--space-lg));
  min-height: 100dvh;
}

/* ── Streak badge ── */
.streak-display {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  color: var(--color-accent);
}

.streak-display .streak-icon {
  font-size: 18px;
}

/* ── Barra de progresso ── */
.progress-bar {
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width var(--transition-slow);
}

.activity-card {
  overflow-x: auto;
}

.activity-header,
.activity-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.activity-wrap {
  display: grid;
  grid-template-columns: 34px max-content;
  gap: var(--space-xs);
  margin-top: var(--space-md);
}

.activity-weekdays {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  gap: 3px;
  color: var(--color-text-secondary);
  font-size: 10px;
  line-height: 12px;
}

.activity-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 12px);
  grid-template-columns: repeat(52, 12px);
  gap: 3px;
}

.activity-cell {
  width: 12px;
  height: 12px;
  display: inline-block;
  border-radius: 3px;
  background: var(--color-bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.activity-reading {
  background: #a78bfa;
}

.activity-full {
  background: #7c3aed;
}

.activity-study {
  background: #c49a3c;
}

.activity-legend {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: var(--space-md);
  color: var(--color-text-secondary);
  font-size: var(--text-caption);
}

.activity-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ── Timer de oração — seletor de meta ── */
.prayer-screen {
  width: min(100%, 760px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Onboarding */
body.onboarding-active {
  overflow: hidden;
}

body.onboarding-active .app-sidebar,
body.onboarding-active #desktop-panel {
  display: none !important;
}

body.onboarding-active #app {
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  padding-left: 0;
  margin-right: 0;
  background: #100a24;
}

.onboarding-screen {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100dvh;
  overflow: hidden;
  color: #f6f1ff;
  background:
    radial-gradient(circle at 18% 14%, rgba(124, 58, 237, 0.35), transparent 30%),
    radial-gradient(circle at 85% 78%, rgba(196, 154, 60, 0.18), transparent 26%),
    linear-gradient(145deg, #0f0a1f 0%, #1b1038 46%, #2f1470 100%);
}

.onboarding-skip {
  position: absolute;
  top: max(var(--space-lg), env(safe-area-inset-top));
  right: var(--space-lg);
  z-index: 3;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  color: rgba(246, 241, 255, 0.72);
  font-size: var(--text-small);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.onboarding-viewport {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  touch-action: pan-y;
}

.onboarding-track {
  display: flex;
  height: 100%;
  transition: transform var(--transition-slow);
  will-change: transform;
}

.onboarding-slide {
  flex: 0 0 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  padding: calc(var(--space-2xl) + var(--space-md)) var(--space-lg) var(--space-xl);
  text-align: center;
}

.onboarding-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 40px;
  line-height: 1;
  opacity: 0.55;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transform: translateY(-50%);
  transition: opacity var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.onboarding-arrow:hover {
  opacity: 0.95;
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-50%) scale(1.04);
}

.onboarding-arrow-left {
  left: var(--space-lg);
}

.onboarding-arrow-right {
  right: var(--space-lg);
}

.onboarding-visual {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 34px;
  color: #fff;
  font-size: 64px;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.95), rgba(76, 29, 149, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.onboarding-visual.is-logo {
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.08);
}

.onboarding-logo {
  width: 86px;
  height: 100px;
  object-fit: contain;
  color: #e0d4ff; /* logo clara no fundo escuro do onboarding */
}

.onboarding-copy {
  width: min(100%, 620px);
}

.onboarding-subtitle {
  margin-bottom: var(--space-sm);
  color: #c4b5fd;
  font-size: var(--text-subtitle);
  font-weight: var(--weight-medium);
}

.onboarding-copy h1 {
  margin-bottom: var(--space-md);
  color: #fff;
  font-size: clamp(30px, 8vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

.onboarding-copy p {
  color: rgba(246, 241, 255, 0.78);
  font-size: var(--text-subtitle);
  line-height: 1.55;
}

.onboarding-footer {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 0 var(--space-lg) calc(var(--space-xl) + env(safe-area-inset-bottom));
}

.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 44px;
  align-items: center;
}

.onboarding-dot {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.28);
  transition: width var(--transition-normal), background var(--transition-normal);
}

.onboarding-dot.active {
  width: 28px;
  background: #a78bfa;
}

.onboarding-start {
  margin-top: var(--space-sm);
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.32);
}

@media (min-width: 768px) {
  body.onboarding-active #app {
    padding-left: 0;
    margin-right: 0;
  }

  .onboarding-slide {
    padding-left: var(--space-2xl);
    padding-right: var(--space-2xl);
  }
}

@media (max-width: 420px) {
  .onboarding-arrow {
    width: 34px;
    height: 34px;
    font-size: 30px;
    opacity: 0.34;
    background: rgba(255, 255, 255, 0.07);
  }

  .onboarding-arrow-left {
    left: var(--space-sm);
  }

  .onboarding-arrow-right {
    right: var(--space-sm);
  }

  .onboarding-slide {
    gap: var(--space-lg);
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .onboarding-visual {
    width: 112px;
    height: 112px;
    border-radius: 28px;
    font-size: 54px;
  }

  .onboarding-logo {
    width: 72px;
    height: 84px;
    color: #e0d4ff;
  }

  .onboarding-copy h1 {
    font-size: 30px;
  }

  .onboarding-copy p {
    font-size: var(--text-body);
  }
}

.prayer-goal-card,
.prayer-history-card {
  margin: 0;
}

.prayer-targets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
}

.target-btn {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  background: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  border: 1.5px solid var(--color-border);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.target-btn.active,
.target-btn:hover:not(:disabled) {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.target-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Mensagem de conclusão do timer ── */
.timer-completion-msg {
  margin-top: var(--space-md);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  color: #fef3c7;
  text-align: center;
  animation: timer-pulse 1.5s ease-in-out infinite;
}

@keyframes timer-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ── Barra de progresso do timer (dentro de .timer-card) ── */
.timer-progress {
  height: 4px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.15);
  overflow: hidden;
}

.timer-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.7);
  transition: width 0.9s linear;
  width: 0%;
}

.timer-card-goal-reached .timer-progress-fill {
  background: linear-gradient(90deg, #22c55e, #facc15);
}

.prayer-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin: 0;
}

.prayer-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.prayer-chart {
  margin: var(--space-lg) 0;
}

.prayer-history-row {
  display: grid;
  grid-template-columns: minmax(82px, auto) minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

.prayer-history-date {
  font-weight: var(--weight-medium);
  color: var(--color-text);
  white-space: nowrap;
}

.prayer-history-duration {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  line-height: 1.25;
}

.prayer-history-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prayer-history-total {
  color: var(--color-text);
  font-weight: var(--weight-medium);
}

.prayer-history-ambient {
  min-width: 0;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .prayer-screen {
    gap: var(--space-md);
  }

  .prayer-targets,
  .ambient-opts {
    justify-content: center;
  }

  .target-btn {
    flex: 1 1 calc(50% - var(--space-xs));
    min-width: 96px;
  }

  .ambient-opt {
    flex: 1 1 calc(50% - 6px);
    max-width: 132px;
  }

  .prayer-stats-grid {
    gap: var(--space-sm);
  }

  .prayer-history-row {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .prayer-history-duration {
    grid-column: 1 / -1;
    order: 3;
  }

  .prayer-history-ambient {
    order: 4;
  }

  .prayer-history-meta {
    white-space: normal;
  }
}

/* ── Controles de música ambiente (dentro de .timer-card) ── */
.ambient-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.btn-ambient {
  font-size: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: opacity var(--transition-fast);
}

.btn-ambient:hover { opacity: 0.75; }

.ambient-opts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.ambient-opt {
  font-size: 13px;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.65);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.ambient-opt.active {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.ambient-opt:hover:not(.active) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.85);
}

/* ── Área de upload de áudio personalizado (dentro de .timer-card) ── */
.ambient-custom-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
  min-height: 28px;
}

.custom-upload-row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
  justify-content: center;
}

.btn-upload-audio {
  display: inline-block;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px dashed rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  padding: 3px 12px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.75);
  transition: background var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
}

.btn-upload-audio:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.ambient-hint {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 0.03em;
}

.custom-file-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.custom-filename {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-remove-audio {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

.btn-remove-audio:hover { color: rgba(255, 255, 255, 0.9); }

/* ── Estado vazio ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  color: var(--color-text-secondary);
  gap: var(--space-md);
}

.empty-state .empty-icon {
  font-size: 48px;
  opacity: 0.5;
}

.empty-text { font-size: var(--text-body); font-weight: var(--weight-medium); }
.empty-sub  { font-size: var(--text-small); color: var(--color-text-tertiary); }

/* ── Nav premium dot ── */
.nav-premium-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  margin-left: 2px;
  vertical-align: middle;
}

/* ── Botões utilitários ── */
.btn-sm       { padding: 6px 12px; font-size: var(--text-small); border-radius: var(--radius-sm); }
.btn-primary  { background: var(--color-primary); color: #fff; border-radius: var(--radius-md); padding: 10px 18px; font-weight: var(--weight-medium); transition: opacity var(--transition-fast); }
.btn-primary:hover:not(:disabled) { opacity: 0.88; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: var(--color-bg-secondary); color: var(--color-primary); border: 1.5px solid var(--color-border); border-radius: var(--radius-md); padding: 8px 14px; font-weight: var(--weight-medium); }
.btn-full     { width: 100%; }
.btn-back     { display: inline-flex; align-items: center; gap: 4px; color: var(--color-primary); font-size: var(--text-small); font-weight: var(--weight-medium); margin-bottom: var(--space-md); }
.btn-icon     { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-full); background: var(--color-bg-secondary); font-size: 18px; }
.btn-danger-text { background: none; color: var(--color-error); font-size: var(--text-small); }
.error-text   { color: var(--color-error); text-align: center; padding: var(--space-lg); }

/* ================================================================
   LEITOR BÍBLICO
   ================================================================ */

.bible-reader {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: var(--color-bg);
}

/* Temas do leitor bíblico agora são controlados pelas classes
   body.theme-* definidas em tokens.css */

.reader-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  position: sticky; top: 0; z-index: 10;
}

.reader-title-wrap { flex: 1; text-align: center; }
.reader-title      { font-size: var(--text-subtitle); font-weight: var(--weight-medium); }

.reader-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md) var(--space-md) var(--space-xl);
  font-size: 17px;
  line-height: 1.75;
}

.reader-error {
  text-align: center;
  color: var(--color-text-secondary);
  padding: var(--space-xl);
}

.verse-list { display: block; }

.verse-item {
  display: inline;
  transition: background 0.2s;
  border-radius: 3px;
}

/* Versículos no card de leitura diária: um por linha com espaçamento */
.bible-text-content .verse-item {
  display: block;
  margin-bottom: var(--space-sm);
  line-height: var(--line-height-reading);
  cursor: pointer;
}

.verse-item.tts-active {
  background: var(--color-highlighted);
}

.verse-item.tts-jump-flash {
  background: rgba(124, 92, 191, 0.28) !important;
  transition: background 0.2s ease-out;
}

.verse-number {
  font-size: 0.7em;
  color: var(--color-vnum);
  font-weight: var(--weight-medium);
  margin-right: 3px;
  vertical-align: super;
  user-select: none;
}

.verse-text { display: inline; }

.reader-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  gap: var(--space-sm);
}

.btn-chapter-nav {
  flex: 1;
  padding: 8px var(--space-sm);
  border-radius: var(--radius-md);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  background: var(--color-bg-secondary);
  color: var(--color-primary);
  text-align: center;
}
.btn-chapter-nav:disabled { opacity: 0.35; }

.reader-tts-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.btn-tts-speed {
  padding: 5px 10px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  min-width: 4.5ch;
  text-align: center;
  line-height: 1;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.btn-tts-speed:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-tts {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
}

/* Settings panel */
.reader-settings-panel {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}
.reader-settings-panel[aria-hidden="false"] { pointer-events: all; }

.settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  transition: opacity 0.2s;
}
.reader-settings-panel[aria-hidden="false"] .settings-backdrop { opacity: 1; }

.settings-drawer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--color-bg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-lg);
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
.reader-settings-panel[aria-hidden="false"] .settings-drawer { transform: translateY(0); }

.settings-title { font-size: var(--text-subtitle); font-weight: var(--weight-medium); margin-bottom: var(--space-md); }
.settings-group { margin-bottom: var(--space-md); }
.settings-label { display: block; font-size: var(--text-small); color: var(--color-text-secondary); margin-bottom: var(--space-xs); }

.btn-group {
  display: flex;
  gap: var(--space-sm);
}
.btn-group button {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
}
.btn-group button.active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.page-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  justify-content: flex-end;
  margin-bottom: var(--space-md);
}

.appearance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
}

.appearance-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-secondary);
  padding: var(--space-sm);
  text-align: left;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.appearance-card:hover {
  border-color: var(--color-primary);
}

.appearance-card.active {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.theme-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
}

.theme-preview span {
  display: block;
  height: 10px;
  border-radius: var(--radius-full);
}

.theme-name {
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

.settings-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.appearance-option {
  min-width: 0;
}

/* Slider de tamanho livre de fonte */
.font-size-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.font-size-slider {
  width: 100%;
  accent-color: var(--color-primary);
  cursor: pointer;
  height: 4px;
}

.appearance-option.active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

body.font-size-small {
  --text-display: 24px;
  --text-title: 18px;
  --text-body: 14px;
  --text-small: 12px;
  --text-caption: 11px;
}

body.font-size-large {
  --text-display: 30px;
  --text-title: 22px;
  --text-body: 16px;
  --text-small: 14px;
  --text-caption: 12px;
}

body.font-size-xlarge {
  --text-display: 32px;
  --text-title: 24px;
  --text-body: 18px;
  --text-small: 15px;
  --text-caption: 13px;
}

body.spacing-compact {
  --space-xs: 3px;
  --space-sm: 6px;
  --space-md: 12px;
  --space-lg: 18px;
  --space-xl: 32px;
}

body.spacing-spacious {
  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 20px;
  --space-lg: 30px;
  --space-xl: 48px;
}

/* Verse context menu */
.verse-context-menu {
  position: fixed;
  z-index: 300;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  flex-direction: column;
  min-width: 140px;
  overflow: hidden;
}
.verse-context-menu button {
  width: 100%;
  padding: 12px var(--space-md);
  text-align: left;
  font-size: var(--text-small);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}
.verse-context-menu button:last-child { border-bottom: none; }
.verse-context-menu button:hover { background: var(--color-bg-secondary); }

.share-verse-modal {
  position: fixed;
  inset: 0;
  z-index: 520;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.share-verse-modal[aria-hidden="false"] {
  display: flex;
}

.share-verse-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}

.share-verse-sheet {
  position: relative;
  width: min(100%, 520px);
  max-height: 92dvh;
  overflow-y: auto;
  padding: var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--color-bg);
  box-shadow: var(--shadow-lg);
}

.share-verse-header,
.share-verse-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.share-template-tabs {
  display: flex;
  gap: var(--space-xs);
  margin: var(--space-md) 0;
}

.share-template-btn {
  flex: 1;
  padding: 8px 10px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
}

.share-template-btn.active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.share-verse-preview {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin-bottom: var(--space-md);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-bg-secondary);
}

.share-verse-actions .btn {
  flex: 1;
}

.tts-voice-select {
  width: auto;
  min-width: 150px;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-small);
}

.tts-controls {
  flex-wrap: wrap;
}

@media (max-width: 420px) {
  .tts-voice-select {
    min-width: 130px;
    flex: 1 1 130px;
  }
}

/* Loading spinner (generic) */
.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: var(--space-xl) auto;
}

/* ================================================================
   PLANOS DE ESTUDO
   ================================================================ */

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}
.screen-title { font-size: var(--text-title); font-weight: var(--weight-medium); }

.plan-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
}
.plan-card.plan-done { opacity: 0.7; }

.plan-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--space-sm); }
.plan-name        { font-size: var(--text-body); font-weight: var(--weight-medium); }
.plan-theme       { font-size: var(--text-small); color: var(--color-text-secondary); margin-top: 2px; }
.badge-done       { font-size: var(--text-caption); color: var(--color-success); font-weight: var(--weight-medium); white-space: nowrap; }

.plan-progress      { margin-bottom: var(--space-sm); }
.plan-progress-bar  { height: 6px; background: var(--color-border); border-radius: var(--radius-full); overflow: hidden; margin-bottom: 4px; }
.plan-progress-fill { height: 100%; background: linear-gradient(90deg, var(--color-primary), var(--color-accent)); border-radius: var(--radius-full); transition: width 0.5s; }
.plan-progress-label { font-size: var(--text-caption); color: var(--color-text-secondary); }

.plan-actions { display: flex; gap: var(--space-sm); margin-top: var(--space-sm); }

/* Plan detail */
.plan-detail-title { font-size: var(--text-title); font-weight: var(--weight-medium); margin-bottom: var(--space-xs); }
.plan-detail-desc  { color: var(--color-text-secondary); font-size: var(--text-small); margin-bottom: var(--space-xs); }
.plan-detail-meta  { font-size: var(--text-caption); color: var(--color-text-tertiary); margin-bottom: var(--space-md); }

.plan-days-list { display: flex; flex-direction: column; gap: var(--space-sm); }

.plan-day {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
}
.plan-day.day-done { background: var(--color-bg-secondary); opacity: 0.75; }

.day-number { min-width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--color-primary-light); color: var(--color-primary); font-size: var(--text-caption); font-weight: var(--weight-medium); flex-shrink: 0; }
.day-info   { flex: 1; }
.day-title  { display: block; font-size: var(--text-small); font-weight: var(--weight-medium); }
.day-ref    { display: block; font-size: var(--text-caption); color: var(--color-primary); }
.day-notes  { display: block; font-size: var(--text-caption); color: var(--color-text-secondary); margin-top: 2px; }
.day-actions { flex-shrink: 0; }

.btn-complete-day {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-bg-secondary);
  border: 1.5px solid var(--color-border);
  font-size: var(--text-small);
  color: var(--color-text-secondary);
}
.btn-complete-day:hover { border-color: var(--color-success); color: var(--color-success); }
.day-check { color: var(--color-success); font-weight: var(--weight-medium); }

/* Create plan form */
.create-plan-form { padding-bottom: var(--space-xl); }
.form-title       { font-size: var(--text-title); font-weight: var(--weight-medium); margin-bottom: var(--space-xs); }
.form-hint        { font-size: var(--text-small); color: var(--color-text-secondary); margin-bottom: var(--space-md); }
.field-label      { display: block; font-size: var(--text-small); font-weight: var(--weight-medium); margin-bottom: var(--space-xs); color: var(--color-text); }
.field-textarea   { width: 100%; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-sm) var(--space-md); resize: none; background: var(--color-bg-secondary); color: var(--color-text); line-height: 1.5; margin-bottom: var(--space-md); }
.field-textarea:focus { outline: none; border-color: var(--color-primary); }

.duration-grid    { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-bottom: var(--space-md); }
.duration-btn     { padding: 8px 16px; border-radius: var(--radius-full); border: 1.5px solid var(--color-border); background: var(--color-bg-secondary); color: var(--color-text-secondary); font-size: var(--text-small); font-weight: var(--weight-medium); }
.duration-btn.active { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-light); }

/* Plan day — clickable row */
.plan-day { cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.plan-day:hover:not(.day-done) { background: var(--color-bg-secondary); border-color: var(--color-primary); }
.plan-day.day-done { cursor: pointer; }

.day-chevron { color: var(--color-text-tertiary); font-size: 18px; line-height: 1; margin-left: var(--space-xs); align-self: center; }

/* Day reflection screen */
.day-reflection { padding-bottom: var(--space-xl); }

.day-reflection-header {
  margin: var(--space-md) 0;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}
.day-reflection-day   { font-size: var(--text-caption); color: var(--color-text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-xs); }
.day-reflection-title { font-size: var(--text-title); font-weight: var(--weight-medium); line-height: 1.3; margin-bottom: var(--space-xs); }
.day-reflection-ref   { font-size: var(--text-small); color: var(--color-primary); font-weight: var(--weight-medium); }

.day-reflection-notes {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  background: var(--color-bg-secondary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-primary);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.day-reflection-body { font-size: var(--text-body); line-height: var(--line-height-reading); color: var(--color-text); }
.day-reflection-body p { margin-bottom: var(--space-md); }
.day-reflection-body p:last-child { margin-bottom: 0; }

.reflection-heading {
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}
.day-reflection-body h4.reflection-heading { font-size: var(--text-small); text-transform: uppercase; letter-spacing: 0.04em; }

.reflection-list { padding-left: var(--space-lg); margin-bottom: var(--space-md); }
.reflection-list li { margin-bottom: var(--space-xs); line-height: var(--line-height-reading); }

.reflection-error { color: var(--color-text-secondary); font-style: italic; }

.day-reflection-actions { margin-top: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-sm); }

.btn-audio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px var(--space-md);
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-primary);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  transition: background 0.15s, color 0.15s;
}
.btn-audio:hover   { background: var(--color-primary-light); }
.btn-audio.playing { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

.day-reflection-done { text-align: center; color: var(--color-success); font-weight: var(--weight-medium); font-size: var(--text-small); padding: var(--space-sm) 0; }

/* ================================================================
   CHAT COM IA
   ================================================================ */

.chat-screen {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--nav-height));
}

.chat-no-passage {
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  color: var(--color-text-secondary);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  gap: var(--space-sm);
}
.chat-welcome-icon { font-size: 40px; }
.chat-welcome-text { font-size: var(--text-small); color: var(--color-text-secondary); line-height: 1.6; }

.chat-bubble {
  max-width: 82%;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--text-small);
  line-height: 1.6;
  word-break: break-word;
}

.chat-message {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  word-break: break-word;
}

.chat-message.user-message {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-message.user-message .message-bubble {
  background: var(--primary, var(--color-primary));
  color: #fff;
  border-radius: 18px 18px 4px 18px;
  padding: 12px 16px;
  line-height: 1.6;
  max-width: 100%;
}

.chat-message.assistant-message {
  align-self: flex-start;
  max-width: 90%;
}

.chat-message.assistant-message .chat-bubble {
  max-width: 100%;
}

.ai-message .message-bubble p {
  margin-bottom: 0.85rem;
  line-height: 1.65;
}

.ai-message .message-bubble p:last-child {
  margin-bottom: 0;
}

.ai-message .message-bubble strong {
  color: var(--primary, var(--color-primary));
}

.bubble-user {
  align-self: flex-end;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md) var(--radius-md) 2px var(--radius-md);
}

.bubble-ai {
  align-self: flex-start;
  background: var(--color-bg-secondary);
  color: var(--color-text);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 2px;
  border: 1px solid var(--color-border);
}

/* Typing indicator */
.chat-thinking {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px var(--space-md);
}
.chat-thinking span {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-text-tertiary);
  animation: think 1s ease-in-out infinite;
}
.chat-thinking span:nth-child(2) { animation-delay: 0.15s; }
.chat-thinking span:nth-child(3) { animation-delay: 0.3s; }
@keyframes think {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-5px); opacity: 1; }
}

/* Suggestions */
.chat-suggestions {
  padding: 0 var(--space-md) var(--space-sm);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.suggestion-chip {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-secondary);
  color: var(--color-primary);
  font-size: var(--text-caption);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.chat-followups {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.chat-suggestion-btn {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-primary);
  font-size: var(--text-caption);
  font-weight: var(--weight-medium);
  cursor: pointer;
}

/* Input row */
.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.chat-input {
  flex: 1;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px var(--space-md);
  background: var(--color-bg-secondary);
  resize: none;
  overflow: hidden;
  line-height: 1.4;
  max-height: 120px;
}
.chat-input:focus { outline: none; border-color: var(--color-primary); }

.btn-send {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.btn-send:disabled { opacity: 0.5; }

/* Page chat: remove default page padding bottom for fixed input */
.page-chat {
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* ================================================================
   MODAL DE UPGRADE
   ================================================================ */

.upgrade-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}
.upgrade-overlay--visible { opacity: 1; }

.upgrade-modal {
  background: var(--color-bg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-lg);
  width: 100%;
  max-width: var(--app-max-width);
  max-height: 90dvh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.25s;
}
.upgrade-overlay--visible .upgrade-modal { transform: translateY(0); }

.upgrade-close {
  position: absolute;
  top: var(--space-md); right: var(--space-md);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-bg-secondary);
  font-size: 18px;
  line-height: 1;
  color: var(--color-text-secondary);
}

.upgrade-hero       { text-align: center; padding: var(--space-md) 0; }
.upgrade-hero-icon  { font-size: 48px; margin-bottom: var(--space-sm); }
.upgrade-title      { font-size: var(--text-title); font-weight: var(--weight-medium); margin-bottom: var(--space-xs); }
.upgrade-subtitle   { font-size: var(--text-small); color: var(--color-text-secondary); }

.premium-waitlist-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.premium-waitlist-hero {
  text-align: center;
  padding: var(--space-md) 0 var(--space-sm);
}

.premium-waitlist-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.premium-waitlist-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.premium-waitlist-label {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  font-weight: var(--weight-medium);
}

.premium-waitlist-input {
  width: 100%;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-secondary);
  color: var(--color-text);
  padding: 13px var(--space-md);
  font-size: var(--text-body);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.premium-waitlist-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.premium-waitlist-success {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: rgba(46, 204, 113, 0.12);
  color: var(--color-success);
  text-align: center;
  font-weight: var(--weight-medium);
}

.upgrade-list { padding: var(--space-sm) 0; margin-bottom: var(--space-md); }
.upgrade-item { display: flex; align-items: center; gap: var(--space-sm); padding: 8px 0; font-size: var(--text-small); border-bottom: 1px solid var(--color-border); }
.upgrade-item:last-child { border-bottom: none; }

.upgrade-pricing {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.upgrade-price-card {
  flex: 1;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  position: relative;
}
.upgrade-price-card.price-highlight {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}
.price-badge {
  position: absolute;
  top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-micro);
  font-weight: var(--weight-medium);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.price-period { display: block; font-size: var(--text-caption); color: var(--color-text-secondary); margin-bottom: 4px; }
.price-value  { display: block; font-size: var(--text-subtitle); font-weight: var(--weight-medium); color: var(--color-primary); }
.price-unit   { font-size: var(--text-caption); font-weight: var(--weight-regular); }
.price-saving { display: block; font-size: var(--text-caption); color: var(--color-text-secondary); margin-top: 4px; }

.btn-upgrade-cta {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  text-align: center;
  margin-bottom: var(--space-sm);
}

.upgrade-cancel-note { text-align: center; font-size: var(--text-caption); color: var(--color-text-tertiary); }

/* ── Seletor de versão bíblica (painel de ajustes do leitor) ── */

.reader-version-badge {
  font-size: var(--text-caption);
  font-weight: var(--weight-medium);
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-radius: var(--radius-full);
  padding: 2px 8px;
  margin-left: var(--space-xs);
  vertical-align: middle;
}

.version-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.version-btn {
  width: 100%;
  text-align: left;
  padding: 10px var(--space-md);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-secondary);
  color: var(--color-text);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.version-btn.active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.version-btn--locked {
  color: var(--color-text-tertiary);
  cursor: not-allowed;
  opacity: 0.7;
}

.version-btn--locked:hover {
  border-color: var(--color-border);
  background: var(--color-bg-secondary);
}

.settings-hint {
  font-size: var(--text-caption);
  color: var(--color-text-tertiary);
  padding: var(--space-sm) 0;
}

.settings-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.settings-section-header,
.reminder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.reminder-row {
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
}

.reminder-row span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reminder-row strong {
  color: var(--color-text);
  font-size: var(--text-body);
}

.reminder-row small {
  color: var(--color-text-secondary);
  font-size: var(--text-small);
}

.reminder-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}

/* ================================================================
   PAINEL CONTEXTUAL DESKTOP
   ================================================================ */

#desktop-panel {
  display: none;
}

@media (min-width: 768px) {
  /* Restaura sidebar e esconde bottom-nav no desktop */
  .app-sidebar {
    display: flex;
  }

  .nav-bar {
    display: none !important;
  }

  /* Conteúdo respeita sidebar (padding-left) e painel direito (margin-right) */
  #app {
    max-width: none;
    min-width: 0;
    height: auto;
    overflow-y: visible;
    border-right: none;
    padding-left: var(--sidebar-width, 200px);
    margin: 0;
    margin-right: var(--desktop-panel-width, 400px);
    transition: margin-right 0.3s ease, padding-left 0.25s ease;
  }

  body.panel-resizing #app {
    transition: none;
  }

  body[data-panel-collapsed="true"] #app {
    margin-right: 0;
  }

  /* Painel fixo à direita, retrátil */
  #desktop-panel {
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: var(--desktop-panel-width, 400px);
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--color-bg-secondary);
    border-left: 1px solid var(--color-border);
    scrollbar-width: none;
    transition: width 0.3s ease;
  }

  body.panel-resizing #desktop-panel {
    transition: none;
    user-select: none;
  }

  .panel-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 30;
    width: 4px;
    height: 100%;
    cursor: col-resize;
    touch-action: none;
    background: transparent;
    transition: background var(--transition-fast);
  }

  .panel-resize-handle:hover,
  .panel-resize-handle.is-resizing {
    background: rgba(122, 92, 255, 0.35);
  }

  body[data-panel-collapsed="true"] #desktop-panel {
    width: 0;
    overflow: hidden;
  }

  #desktop-panel::-webkit-scrollbar {
    display: none;
  }

  /* Botão de toggle posicionado na borda esquerda do painel */
  .dp-toggle {
    position: fixed;
    right: var(--desktop-panel-width, 400px);
    top: var(--space-md);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 48px;
    padding: 0;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-right: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    transition: right 0.3s ease, color var(--transition-fast);
  }

  .dp-toggle:hover {
    color: var(--color-primary);
  }

  body[data-panel-collapsed="true"] .dp-toggle {
    right: 0;
  }

  /* ── Header fixo do painel ── */
  .dp-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-lg) var(--space-md);
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
  }

  .dp-logo-icon {
    width: 36px;
    height: 42px;
    object-fit: contain;
    flex-shrink: 0;
    color: var(--color-primary); /* currentColor adapta ao tema do painel */
  }

  .dp-logo-name {
    font-size: var(--text-subtitle);
    font-weight: var(--weight-medium);
    color: var(--color-text);
    line-height: 1.2;
  }

  .dp-logo-tagline {
    font-size: var(--text-caption);
    color: var(--color-text-secondary);
  }

  /* ── Corpo do painel ── */
  .dp-body {
    flex: 1;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
  }

  .dp-section-title {
    font-size: var(--text-micro);
    font-weight: var(--weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-sm);
  }

  .dp-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
  }

  /* ── Versículo ── */
  .dp-verse-text {
    font-size: var(--text-body);
    line-height: var(--line-height-reading);
    color: var(--color-text);
    font-style: italic;
    margin-bottom: var(--space-sm);
  }

  .dp-verse-ref {
    font-size: var(--text-small);
    font-weight: var(--weight-medium);
    color: var(--color-primary);
  }

  /* ── Versículos de oração separados por linha ── */
  .dp-prayer-verse + .dp-prayer-verse {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
  }

  /* ── Streak ── */
  .dp-streak-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
    gap: var(--space-sm);
  }

  .dp-streak-card {
    text-align: center;
    padding: var(--space-lg) var(--space-md);
  }

  .dp-streak-card--compact {
    padding: var(--space-md) var(--space-sm);
  }

  .dp-streak-card--compact .dp-streak-days {
    font-size: 40px;
  }

  .dp-streak-kicker {
    font-size: var(--text-caption);
    font-weight: var(--weight-medium);
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
  }

  .dp-streak-days {
    font-size: 48px;
    font-weight: var(--weight-medium);
    color: var(--color-accent);
    line-height: 1;
  }

  .dp-streak-label {
    font-size: var(--text-small);
    color: var(--color-text-secondary);
    line-height: 1.25;
    margin-top: var(--space-xs);
    overflow-wrap: normal;
  }

  .dp-streak-icon {
    font-size: 28px;
    margin-top: var(--space-sm);
  }

  /* ── Progresso de plano ── */
  .dp-plan-name {
    font-size: var(--text-body);
    font-weight: var(--weight-medium);
    color: var(--color-text);
    margin-bottom: var(--space-xs);
  }

  .dp-plan-meta {
    font-size: var(--text-small);
    color: var(--color-text-secondary);
  }

  .dp-progress-bar {
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--color-border);
    overflow: hidden;
    margin-top: var(--space-sm);
  }

  .dp-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transition: width var(--transition-slow);
  }

  /* ── Estados auxiliares ── */
  .dp-loading {
    color: var(--color-text-tertiary);
    font-size: var(--text-small);
    text-align: center;
    padding: var(--space-xl) 0;
  }

  .dp-empty {
    text-align: center;
    color: var(--color-text-tertiary);
    font-size: var(--text-small);
    padding: var(--space-xl) 0;
  }

  .dp-reflection-text {
    font-size: var(--text-body);
    line-height: var(--line-height-reading);
    color: var(--color-text-secondary);
  }

  #home-reflection,
  #home-reflection .reflection-content,
  #home-reflection .dp-reflection-text {
    max-height: none;
    overflow: visible;
  }

  .reading-plan-header,
  .reading-day-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    min-width: 0;
  }

  .reading-plan-header {
    margin-bottom: var(--space-md);
    color: var(--color-text-secondary);
    font-size: var(--text-small);
    font-weight: var(--weight-medium);
    flex-wrap: wrap;
  }

  .reading-plan-header > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .reading-day-nav .btn {
    flex: 1;
    min-width: min(160px, 100%);
    white-space: normal;
  }

  .coin-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 var(--space-sm);
    border-radius: var(--radius-full);
    background: var(--color-accent-light);
    color: var(--color-primary);
    font-size: var(--text-small);
    font-weight: var(--weight-medium);
  }

  .coin-gain-bubble {
    position: fixed;
    top: 72px;
    right: 24px;
    z-index: 1000;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    background: var(--color-accent);
    color: #fff;
    font-weight: var(--weight-medium);
    box-shadow: var(--shadow-lg);
    animation: coinGain 1.8s ease forwards;
  }

  @keyframes coinGain {
    0% { transform: translateY(8px); opacity: 0; }
    20% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-18px); opacity: 0; }
  }

  .coin-balance-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .coin-balance-value {
    font-size: 28px;
    font-weight: var(--weight-bold);
    color: var(--color-primary);
  }

  .coin-earn-list {
    margin: 0;
    padding-left: 18px;
    color: var(--color-text-secondary);
    line-height: 1.8;
  }

  .coin-history-row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
  }

  .coin-history-row small {
    display: block;
    color: var(--color-text-tertiary);
    font-size: var(--text-caption);
    margin-top: 2px;
  }

  .coin-unlock-box {
    display: grid;
    gap: var(--space-sm);
    margin: var(--space-lg) 0;
  }

  .dp-passage-ref {
    display: block;
    margin-top: var(--space-sm);
    font-size: var(--text-small);
    font-weight: var(--weight-medium);
    color: var(--color-primary);
  }
}

/* ============================================================
   MINHA JORNADA — Histórico de perseverança em Configurações
   ============================================================ */

.journey-header {
  margin-bottom: var(--space-md);
}

.journey-loading {
  display: flex;
  justify-content: center;
  padding: var(--space-xl) 0;
}

.journey-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.journey-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-md) var(--space-sm);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  gap: var(--space-xs);
}

.journey-stat-icon {
  font-size: 24px;
  line-height: 1;
}

.journey-stat-value {
  font-size: var(--text-title);
  font-weight: var(--weight-medium);
  color: var(--color-accent);
  line-height: 1;
}

.journey-stat-label {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  line-height: 1.3;
}

/* Heatmap */
.journey-heatmap-wrap {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.journey-heatmap-title,
.journey-achievements-title {
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 3px;
  width: 100%;
  margin-bottom: var(--space-sm);
}

.heatmap-cell {
  aspect-ratio: 1 / 1;
  min-width: 0;
  border-radius: 3px;
}

.heatmap-level-0 { background: var(--color-border); }
.heatmap-level-1 { background: rgba(124, 92, 191, 0.3); }
.heatmap-level-2 { background: rgba(124, 92, 191, 0.6); }
.heatmap-level-3 { background: var(--color-primary); }

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
}

.heatmap-legend .heatmap-cell {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* Conquistas */
.journey-achievements {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  margin-bottom: var(--space-lg);
}

.journey-achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.achievement-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-md) var(--space-sm);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  gap: var(--space-xs);
  border: 1.5px solid var(--color-border);
}

.achievement-unlocked {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-sm);
}

.achievement-locked {
  background: var(--color-bg-secondary);
}

.achievement-locked .achievement-title {
  color: var(--color-text-secondary);
}

.achievement-icon {
  font-size: 24px;
  line-height: 1;
}

.achievement-title {
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

.achievement-desc {
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  line-height: 1.3;
}
