:root {
  --bg: #f6f1e7;
  --bg-card: #ffffff;
  --ink: #1f2a26;
  --ink-soft: #5a6b63;
  --accent: #3b5a4a;
  --accent-soft: #6b8a78;
  --accent-bg: #e7efe9;
  --gold: #b18a3e;
  --danger: #b3261e;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(31, 42, 38, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body {
  padding-bottom: env(safe-area-inset-bottom);
}

.hidden { display: none !important; }

/* ============ AUTH ============ */
.auth-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(107,138,120,0.25), transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(177,138,62,0.18), transparent 50%),
    var(--bg);
}

.auth-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 32px 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-brand { text-align: center; margin-bottom: 24px; }
.brand-mark {
  width: 56px; height: 56px; line-height: 56px;
  margin: 0 auto 12px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 28px;
}
.auth-brand h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.5px;
  color: var(--accent);
}
.brand-sub {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.auth-tabs {
  display: flex;
  background: var(--accent-bg);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 14px;
}
.auth-tab.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: var(--ink-soft);
  gap: 6px;
}
.auth-form input {
  border: 1px solid #e1dccf;
  background: #faf7f0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, background .15s;
}
.auth-form input:focus {
  border-color: var(--accent);
  background: #fff;
}

.btn-primary {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn-primary:hover { background: #2f4a3c; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-error {
  margin-top: 14px;
  padding: 10px 12px;
  background: #fdecea;
  color: var(--danger);
  border-radius: 10px;
  font-size: 14px;
}
.auth-success {
  margin-top: 14px;
  padding: 10px 12px;
  background: #e7efe9;
  color: var(--accent);
  border-radius: 10px;
  font-size: 14px;
}
.auth-info {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 4px;
}
.auth-legal {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 4px 0 0;
}
.auth-legal a { color: var(--accent); text-decoration: none; }
.auth-legal a:hover { text-decoration: underline; }
.forgot-link {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  margin-top: 4px;
  font-family: inherit;
  text-align: center;
}
.forgot-link:hover { text-decoration: underline; }
.auth-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f1eadb;
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
}
.auth-footer a { color: var(--ink-soft); text-decoration: none; }
.auth-footer a:hover { color: var(--accent); }

.email-verify-banner {
  background: linear-gradient(135deg, #fff7c2 0%, #ffe082 100%);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #8a6300;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.email-verify-banner.hidden { display: none; }
.evb-icon { font-size: 18px; line-height: 1; flex: 0 0 auto; }
.evb-text { flex: 1; line-height: 1.4; }
.evb-btn {
  border: 0;
  background: #8a6300;
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  flex: 0 0 auto;
}
.evb-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-danger {
  width: 100%;
  border: 1.5px solid #fbdce4;
  background: transparent;
  color: var(--danger);
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 12px;
}
.btn-danger:hover { background: #fdecea; }

.account-legal {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
}
.account-legal a { color: var(--ink-soft); text-decoration: none; }
.account-legal a:hover { color: var(--accent); }

/* ============ APP ============ */
.app-view {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px calc(80px + env(safe-area-inset-bottom));
  padding-top: max(16px, env(safe-area-inset-top));
}

/* views */
.view { display: none; }
.view.active { display: block; animation: fade .2s ease; }

.app-header { margin-bottom: 16px; }
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.hello {
  font-size: 13px;
  color: var(--ink-soft);
}
.app-title {
  margin: 2px 0 0;
  font-size: 20px;
  color: var(--accent);
  letter-spacing: -0.3px;
}

.icon-btn {
  border: 0;
  background: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 18px;
  color: var(--ink-soft);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.trilha-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: #fff;
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow);
  text-align: left;
}
.trilha-pill:active { transform: scale(0.99); }
.trilha-pill-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex: 0 0 auto;
}
.trilha-pill-text { flex: 1; min-width: 0; }
.trilha-pill-label { display: block; font-size: 10px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; }
.trilha-pill-title { display: block; font-size: 15px; font-weight: 700; color: var(--accent); margin-top: 1px; }
.trilha-pill-arrow { font-size: 20px; color: var(--ink-soft); font-weight: 700; }

.empty-today {
  background: #fff;
  border-radius: 18px;
  padding: 36px 24px;
  text-align: center;
  margin-top: 16px;
  box-shadow: var(--shadow);
}
.empty-today .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-today h3 { margin: 0 0 8px; font-size: 18px; color: var(--accent); }
.empty-today p { margin: 0 0 20px; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.empty-today.hidden { display: none; }

.progress {
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}
.progress-bar {
  flex: 1;
  height: 8px;
  background: var(--accent-bg);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: 999px;
  transition: width .3s ease;
  width: 0%;
}
.progress-text {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
  white-space: nowrap;
}

/* DAY STRIP */
.day-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 4px;
  margin: 0 -4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.day-strip::-webkit-scrollbar { display: none; }
.day-pill {
  flex: 0 0 auto;
  scroll-snap-align: center;
  min-width: 60px;
  padding: 10px 8px;
  background: #fff;
  border: 1px solid #ecdfd0;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}
.day-pill .pill-label {
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.day-pill .pill-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2px;
  line-height: 1;
}
.day-pill.done .pill-num { color: var(--accent); }
.day-pill.done::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.day-pill.active {
  background: var(--accent);
  border-color: var(--accent);
}
.day-pill.active .pill-label,
.day-pill.active .pill-num { color: #fff; }
.day-pill.active.done::after { color: var(--gold); }

.day-pill.locked {
  background: #f3ede1;
  border-color: #e8e0cf;
  cursor: not-allowed;
}
.day-pill.locked .pill-label,
.day-pill.locked .pill-num { color: #b8b0a0; }
.day-pill.locked .pill-lock {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 10px;
  opacity: 0.6;
}

.next-unlock {
  margin-top: 10px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 12px;
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(31,42,38,0.04);
  font-weight: 600;
}
.next-unlock .unlock-icon { font-size: 16px; }
.next-unlock.shake { animation: shake .4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* CONTENT */
.day-meta {
  margin: 8px 4px 14px;
}
.day-block {
  font-size: 12px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
}
.day-title {
  font-size: 22px;
  color: var(--ink);
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: -0.3px;
}

.tabs {
  display: flex;
  gap: 6px;
  background: #fff;
  padding: 6px;
  border-radius: 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 12px 8px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 14px;
  transition: all .15s;
}
.tab.active {
  background: var(--accent-bg);
  color: var(--accent);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade .2s ease; }

@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* READING */
.verse-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
  margin-bottom: 16px;
}
.verse-ref {
  font-size: 13px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity .15s;
}
.verse-ref::after {
  content: '📖';
  font-size: 14px;
  opacity: 0.7;
  filter: none;
}
.verse-ref:hover { opacity: 0.75; }
.verse-card { cursor: pointer; transition: transform .1s; }
.verse-card:active { transform: scale(0.995); }
.verse-text {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  font-family: "Georgia", "Times New Roman", serif;
  font-style: italic;
  white-space: pre-line;
}
.verse-text .verse-num {
  display: inline-block;
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-style: normal;
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  vertical-align: super;
  margin-right: 3px;
}
.verse-source {
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  opacity: 0.7;
}

.reflection-card {
  background: linear-gradient(135deg, #fff 0%, #faf5e9 100%);
  border-radius: var(--radius);
  padding: 22px 22px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
  margin-bottom: 16px;
}
.reflection-label {
  font-size: 12px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  margin-bottom: 10px;
}
.reflection-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  font-family: "Georgia", "Times New Roman", serif;
}

.reading-tip {
  background: var(--accent-bg);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 16px;
  line-height: 1.5;
}

#go-devotional { width: 100%; }

/* DEVOTIONAL */
.prompt-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--ink-soft);
}
.prompt-card strong { color: var(--accent); display: block; margin-bottom: 8px; }
.prompt-card ul { margin: 0; padding-left: 18px; line-height: 1.6; }

#devotional-text {
  width: 100%;
  min-height: 240px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid #e1dccf;
  background: #fff;
  font-size: 16px;
  font-family: inherit;
  line-height: 1.6;
  color: var(--ink);
  resize: vertical;
  outline: none;
  transition: border-color .15s;
}
#devotional-text:focus { border-color: var(--accent); }

.devotional-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 12px;
}
.save-status {
  font-size: 13px;
  color: var(--ink-soft);
}
.save-status.saved { color: var(--accent); font-weight: 600; }
.save-status.dirty { color: var(--gold); font-weight: 600; }

#save-btn { padding: 12px 22px; font-size: 15px; }

.footer {
  text-align: center;
  color: var(--ink-soft);
  font-size: 12px;
  margin-top: 32px;
  opacity: 0.7;
}

/* ============ BOTTOM NAV ============ */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid #ecdfd0;
  display: flex;
  justify-content: space-around;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
}
.nav-btn {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 6px 4px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: inherit;
  transition: color .15s, background .15s;
}
.nav-icon { font-size: 22px; line-height: 1; filter: grayscale(0.4); transition: filter .15s; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: 0.2px; }
.nav-btn.active { color: var(--accent); }
.nav-btn.active .nav-icon { filter: grayscale(0); }
.nav-btn:active { background: var(--accent-bg); }

/* ============ VIEW HEADER ============ */
.view-header {
  margin: 4px 4px 16px;
}
.view-title {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.4px;
  color: var(--accent);
}
.view-sub {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ============ HISTÓRICO: SELETOR DE TRILHA ============ */
.historico-trilha-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 4px 8px;
  margin: 0 -4px 8px;
  scroll-snap-type: x mandatory;
}
.historico-trilha-chips::-webkit-scrollbar { display: none; }
.hist-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border: 1.5px solid #e1dccf;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
  transition: all .15s;
}
.hist-chip:active { transform: scale(0.97); }
.hist-chip.active {
  background: var(--chip-color, var(--accent));
  border-color: var(--chip-color, var(--accent));
  color: #fff;
}
.hist-chip-icon { font-size: 16px; line-height: 1; }
.hist-chip-label {
  font-weight: 700;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hist-chip-count {
  font-size: 11px;
  font-weight: 700;
  background: rgba(0,0,0,0.06);
  padding: 2px 8px;
  border-radius: 999px;
  opacity: 0.9;
}
.hist-chip.active .hist-chip-count {
  background: rgba(255,255,255,0.25);
}

/* ============ MEUS DEVOCIONAIS ============ */
.filter-row {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: 0 0 auto;
  border: 1px solid #e1dccf;
  background: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
}
.filter-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.devotionals-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dev-row {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(31,42,38,0.05);
  border: 1px solid transparent;
  transition: transform .1s, border-color .15s;
}
.dev-row:active { transform: scale(0.99); }
.dev-row.done { border-color: var(--accent-bg); }
.dev-row.pending .dev-status-dot { background: #e1dccf; }
.dev-row.done .dev-status-dot { background: var(--accent); }
.dev-row.done .dev-status-dot::after { content: '✓'; color: #fff; font-size: 13px; font-weight: 700; }
.dev-row.locked { opacity: 0.55; cursor: not-allowed; }
.dev-row.locked .dev-day-badge { background: #f3ede1; color: #b8b0a0; }
.dev-row.locked .dev-status-dot { background: transparent; font-size: 14px; }
.dev-day-badge {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1;
}
.dev-row.done .dev-day-badge { background: var(--accent); color: #fff; }
.dev-day-badge .dev-day-num { font-size: 18px; }
.dev-day-badge .dev-day-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.8; margin-top: 2px; }
.dev-content { flex: 1; min-width: 0; }
.dev-content-title { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.3; margin-bottom: 4px; }
.dev-content-block { font-size: 11px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; margin-bottom: 6px; }
.dev-content-preview {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dev-content-pending {
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
  opacity: 0.7;
}
.dev-status-dot {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-soft);
  font-size: 14px;
}

/* ============ HOME (front page) ============ */
.home-header { margin: 4px 4px 16px; }
.home-greeting {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.home-date {
  font-size: 13px;
  color: var(--ink-soft);
  text-transform: capitalize;
  margin-top: 2px;
}

.home-today-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.home-today-card {
  width: 100%;
  background: var(--card-color, var(--accent));
  background-image: linear-gradient(135deg, rgba(255,255,255,0.0) 0%, rgba(0,0,0,0.18) 100%);
  color: #fff;
  border: 0;
  border-radius: 20px;
  padding: 20px 22px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  transition: transform .1s;
}
.home-today-card:active { transform: scale(0.99); }

.home-caught-up-card {
  background: linear-gradient(135deg, #faf5e9 0%, #fff6dc 100%);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  border: 1.5px solid #f0e3b8;
}
.home-caught-up-card.hidden { display: none; }
.caught-up-icon {
  font-size: 32px;
  line-height: 1;
  flex: 0 0 auto;
}
.caught-up-text { flex: 1; min-width: 0; }
.caught-up-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 2px;
}
.caught-up-sub {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.home-today-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  opacity: 0.85;
  margin-bottom: 8px;
}
.home-today-trilha {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 4px;
}
.home-today-day {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.home-today-verse {
  font-size: 13px;
  font-family: Georgia, serif;
  font-style: italic;
  opacity: 0.9;
  margin-bottom: 14px;
}
.home-today-cta {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
}

.home-empty-card {
  background: #fff;
  border-radius: 20px;
  padding: 36px 24px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.home-empty-card.hidden { display: none; }
.home-empty-icon { font-size: 44px; margin-bottom: 10px; }
.home-empty-card h3 { margin: 0 0 6px; font-size: 18px; color: var(--accent); }
.home-empty-card p { margin: 0 0 18px; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }

.home-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
.home-stat {
  background: #fff;
  border-radius: 14px;
  padding: 14px 8px 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(31,42,38,0.04);
}
.home-stat-icon { font-size: 22px; line-height: 1; margin-bottom: 4px; }
.home-stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.3px;
  line-height: 1.1;
}
.home-stat-label {
  font-size: 10px;
  color: var(--ink-soft);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 2px;
}

.reading-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.reading-stat {
  border-radius: 16px;
  padding: 16px 12px 14px;
  text-align: left;
  box-shadow: 0 2px 12px rgba(31,42,38,0.05);
  position: relative;
}
.reading-stat-amber { background: linear-gradient(135deg, #fff8e1 0%, #ffe082 100%); }
.reading-stat-gold  { background: linear-gradient(135deg, #fff3d6 0%, #f5d484 100%); }
.reading-stat-teal  { background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%); }
.reading-stat-icon { font-size: 22px; margin-bottom: 8px; line-height: 1; }
.reading-stat-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.reading-stat-amber .reading-stat-value { color: #a06200; }
.reading-stat-gold  .reading-stat-value { color: #8a5a00; }
.reading-stat-teal  .reading-stat-value { color: #00695c; }
.reading-stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 2px;
}
.reading-stat-amber .reading-stat-label { color: #a06200; }
.reading-stat-gold  .reading-stat-label { color: #8a5a00; }
.reading-stat-teal  .reading-stat-label { color: #00695c; }
.reading-stat-sub {
  font-size: 10px;
  color: var(--ink-soft);
  opacity: 0.85;
  margin-top: 4px;
  font-weight: 600;
}

.home-section { margin-bottom: 24px; }
.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px 12px;
}
.home-section h3 {
  margin: 0 4px 12px;
  font-size: 17px;
  color: var(--ink);
  font-weight: 700;
}
.home-section-header h3 { margin: 0; }
.home-section-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 8px;
}

.home-trilhas-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 4px 8px;
  margin: 0 -4px;
  scroll-snap-type: x mandatory;
}
.home-trilhas-scroll::-webkit-scrollbar { display: none; }
.home-trilha-mini {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 140px;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 14px 12px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  box-shadow: 0 2px 8px rgba(31,42,38,0.04);
}
.home-trilha-mini:active { transform: scale(0.98); }
.home-trilha-mini.is-active { border-color: var(--accent); }
.home-trilha-mini-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 10px;
}
.home-trilha-mini-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-trilha-mini-bar {
  height: 4px;
  background: var(--accent-bg);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}
.home-trilha-mini-fill { height: 100%; border-radius: 999px; transition: width .3s; }
.home-trilha-mini-pct { font-size: 11px; color: var(--ink-soft); font-weight: 600; }

.home-trilha-mini.available { width: 160px; }
.home-trilha-mini-sub {
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.35;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-trilha-mini-cta {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.home-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.home-tool {
  background: #fff;
  border: 0;
  border-radius: 16px;
  padding: 16px 14px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  box-shadow: 0 2px 8px rgba(31,42,38,0.05);
  transition: transform .1s;
}
.home-tool:active { transform: scale(0.98); }
.home-tool-icon { font-size: 28px; line-height: 1; margin-bottom: 8px; }
.home-tool-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.home-tool-meta {
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ============ BÍBLIA ============ */
.bible-header { margin-bottom: 14px; }

.bible-search {
  position: relative;
  margin-bottom: 14px;
}
.bible-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.55;
}
.bible-search input {
  width: 100%;
  border: 0;
  background: #fff;
  border-radius: 999px;
  padding: 14px 18px 14px 40px;
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
  outline: none;
  box-shadow: 0 2px 10px rgba(31,42,38,0.05);
}

.full-reading-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.full-reading-btn {
  background: #fff;
  border: 0;
  border-radius: 14px;
  padding: 12px 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  box-shadow: 0 2px 10px rgba(31,42,38,0.05);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform .1s;
}
.full-reading-btn:active { transform: scale(0.97); }
.full-reading-icon {
  font-size: 22px;
  line-height: 1;
  flex: 0 0 auto;
}
.full-reading-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.full-reading-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.2px;
  line-height: 1.15;
}
.full-reading-sub {
  font-size: 10px;
  color: var(--ink-soft);
  font-weight: 600;
  margin-top: 1px;
}

.testament-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  padding: 4px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(31,42,38,0.04);
}
.testament-tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 12px 8px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: all .15s;
}
.testament-tab.active {
  background: var(--accent);
  color: #fff;
}

.bible-books-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bible-book-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(31,42,38,0.05);
  transition: transform .1s;
}
.bible-book-card:active { transform: scale(0.99); }
.bible-book-info { flex: 1; min-width: 0; }
.bible-book-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}
.bible-book-meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.bible-book-bar {
  height: 5px;
  background: #f1eadb;
  border-radius: 999px;
  overflow: hidden;
}
.bible-book-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .3s;
}
.bible-book-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.bible-book-pct {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}
.bible-book-arrow {
  font-size: 24px;
  color: var(--ink-soft);
  line-height: 1;
  opacity: 0.6;
}

/* book detail */
.view-header-with-back {
  display: flex;
  align-items: center;
  gap: 12px;
}
.back-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(31,42,38,0.06);
  flex: 0 0 auto;
}
.view-header-with-back .view-title {
  flex: 1;
  text-align: center;
  margin-right: 40px;
}

.book-progress-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(31,42,38,0.05);
}
.book-progress-info { flex: 1; }
.book-progress-label {
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  margin-bottom: 6px;
}
.book-progress-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.book-progress-ring {
  position: relative;
  width: 80px;
  height: 80px;
  flex: 0 0 auto;
}
.book-progress-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.book-summary-card {
  background: linear-gradient(135deg, #fff 0%, #faf5e9 100%);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(31,42,38,0.04);
  border-left: 4px solid var(--gold);
}
.book-summary-label {
  font-size: 11px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 800;
  margin-bottom: 8px;
}
.book-summary-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

.bible-chapters-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.chapter-cell {
  aspect-ratio: 2 / 1;
  border: 0;
  background: #fff;
  border-radius: 999px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(31,42,38,0.04);
  transition: transform .1s, background .15s, color .15s;
}
.chapter-cell:active { transform: scale(0.96); }
.chapter-cell.read { background: var(--accent); color: #fff; }
.chapter-cell.read::after { content: ' ✓'; font-size: 11px; opacity: 0.85; }

.book-reading-btn {
  width: 100%;
  margin-bottom: 14px;
}

/* ===== MODO LEITURA: TEXTO CORRIDO ===== */
.reading-tag {
  font-size: 11px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  margin: 4px 4px 16px;
  text-align: center;
}
.reading-content {
  padding: 0 4px 20px;
}
.reading-book-title {
  margin: 32px 0 16px;
  font-size: 28px;
  font-weight: 800;
  color: var(--gold);
  text-align: center;
  letter-spacing: -0.5px;
  padding: 14px 0;
  border-top: 2px solid #f1eadb;
  border-bottom: 2px solid #f1eadb;
}
.reading-book-title:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.reading-load-indicator {
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}
.reading-chapter {
  margin-bottom: 28px;
}
.reading-chapter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid #f1eadb;
  padding-bottom: 10px;
}
.reading-chapter-heading {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.4px;
}
.reading-mark-pill {
  border: 1.5px solid #e1dccf;
  background: #fff;
  color: var(--ink-soft);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all .15s;
}
.reading-mark-pill:active { transform: scale(0.97); }
.reading-mark-pill.is-read {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.reading-chapter-text {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.rv {
  cursor: pointer;
  border-radius: 4px;
  padding: 1px 2px;
  transition: background .15s;
}
.rv:hover { background: rgba(0,0,0,0.04); }
.rv sup {
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 10px;
  color: var(--gold);
  font-weight: 800;
  margin-right: 3px;
  line-height: 1;
}
.rv.is-color-yellow { background: #fff7c2; }
.rv.is-color-green  { background: #d4f0d4; }
.rv.is-color-pink   { background: #fbdce4; }
.rv.is-color-blue   { background: #d3e6f7; }
.rv.is-color-orange { background: #ffe4c2; }

/* chapter view */
.chapter-tag {
  font-size: 11px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  margin: 8px 4px 6px;
}
.chapter-heading {
  margin: 0 4px 18px;
  font-size: 30px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.7px;
}
.chapter-text {
  background: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  padding: 4px;
}
.chapter-verse {
  margin: 0 0 14px;
  padding: 2px 4px;
  border-radius: 6px;
  transition: background .25s;
}
.chapter-verse.is-highlighted {
  background: linear-gradient(90deg, #faf5e9 0%, #fff6dc 100%);
  border-left: 3px solid var(--gold);
  padding: 10px 12px;
  margin-left: -8px;
}
.chapter-verse { cursor: pointer; }
.chapter-verse:hover { background: rgba(0,0,0,0.025); }
.chapter-verse.is-color-yellow { background: #fff7c2; }
.chapter-verse.is-color-green  { background: #d4f0d4; }
.chapter-verse.is-color-pink   { background: #fbdce4; }
.chapter-verse.is-color-blue   { background: #d3e6f7; }
.chapter-verse.is-color-orange { background: #ffe4c2; }
.verse-note-icon {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  vertical-align: super;
  opacity: 0.7;
}

/* editor inline de anotação */
.annot-editor {
  background: #fff;
  border: 1px solid #e1dccf;
  border-radius: 14px;
  padding: 14px;
  margin: 10px 0 18px;
  box-shadow: 0 4px 16px rgba(31,42,38,0.08);
}
.annot-colors {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.annot-color {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.annot-color.selected { border-color: var(--accent); transform: scale(1.1); box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.annot-color-yellow { background: #fff7c2; }
.annot-color-green  { background: #d4f0d4; }
.annot-color-pink   { background: #fbdce4; }
.annot-color-blue   { background: #d3e6f7; }
.annot-color-orange { background: #ffe4c2; }
.annot-color-none   { background: #f5f0e3; }
.annot-note {
  width: 100%;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid #e1dccf;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  background: #faf7f0;
  resize: vertical;
  outline: none;
}
.annot-note:focus { border-color: var(--accent); background: #fff; }
.annot-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.annot-actions-right { display: flex; gap: 8px; }
.annot-cancel, .annot-delete {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
}
.annot-cancel { color: var(--ink-soft); }
.annot-delete { color: var(--danger); }
.annot-save {
  border: 0;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 9px 18px;
  border-radius: 8px;
}

/* lista de anotações */
.annotations-list { display: flex; flex-direction: column; gap: 18px; }
.annot-group {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(31,42,38,0.04);
}
.annot-group-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 4px 4px 12px;
  border-bottom: 1px solid #f1eadb;
  margin-bottom: 10px;
}
.annot-item {
  padding: 12px 12px;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 6px;
  border-left: 3px solid transparent;
  transition: background .15s;
}
.annot-item:hover { background: var(--accent-bg); }
.annot-item.is-color-yellow { border-left-color: #f5d017; background: #fffaeb; }
.annot-item.is-color-green  { border-left-color: #4caf50; background: #ebf8eb; }
.annot-item.is-color-pink   { border-left-color: #d63d6e; background: #fdf0f3; }
.annot-item.is-color-blue   { border-left-color: #3b82f6; background: #ebf3fd; }
.annot-item.is-color-orange { border-left-color: #f47c1f; background: #fff3e6; }
.annot-item-ref {
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.annot-item-verse {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 8px;
}
.annot-item-note {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
  background: rgba(0,0,0,0.03);
  padding: 8px 10px;
  border-radius: 8px;
}
.chapter-verse-num {
  display: inline-block;
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-style: normal;
  font-size: 11px;
  color: var(--gold);
  font-weight: 800;
  vertical-align: super;
  margin-right: 4px;
}

.chapter-mark-card {
  margin-top: 18px;
  background: rgba(255,255,255,0.6);
  border: 1px dashed #e1d3d3;
  border-radius: 18px;
  padding: 22px 18px;
  text-align: center;
}
.chapter-mark-quote {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.chapter-mark-btn {
  padding: 14px 28px;
  border-radius: 999px;
}
.chapter-mark-btn.is-read { background: var(--gold); }
.chapter-mark-btn.is-read:hover { background: #8e6c2c; }

.chapter-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 4px 4px;
}
.chapter-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(31,42,38,0.06);
  font-family: inherit;
}
.chapter-nav-btn:active { transform: scale(0.95); }
.chapter-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.chapter-nav-info {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

/* ============ TRILHAS VIEW ============ */
.trilhas-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.trilha-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  gap: 14px;
  box-shadow: 0 2px 10px rgba(31,42,38,0.05);
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .1s, border-color .15s;
}
.trilha-card:active { transform: scale(0.99); }
.trilha-card.is-active { border-color: var(--accent); }
.trilha-card.available { cursor: default; }
.trilha-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  flex: 0 0 auto;
}
.trilha-info { flex: 1; min-width: 0; }
.trilha-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.trilha-badge {
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 7px;
  border-radius: 999px;
}
.trilha-subtitle {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 8px;
  line-height: 1.3;
}
.trilha-description {
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 12px;
  line-height: 1.4;
}
.trilha-progress { margin-top: 4px; }
.trilha-progress-bar {
  height: 6px;
  background: var(--accent-bg);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}
.trilha-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .3s;
}
.trilha-progress-text {
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 600;
}
.trilha-actions {
  margin-top: 4px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.trilha-accept-btn {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.trilha-accept-btn:active { transform: scale(0.97); }
.trilha-preview-btn {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.trilha-preview-btn:active { transform: scale(0.97); }

/* ===== PRÉVIA DE TRILHA ===== */
.trilha-preview-hero {
  background: #fff;
  border-radius: 18px;
  padding: 22px 20px 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(31,42,38,0.05);
  text-align: center;
}
.trilha-preview-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}
.trilha-preview-subtitle {
  font-size: 14px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}
.trilha-preview-description {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.trilha-preview-meta {
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--accent-bg);
  border-radius: 999px;
  padding: 6px 14px;
  display: inline-block;
  font-weight: 600;
}

.trilha-preview-blocks {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}
.preview-block {
  background: #fff;
  border-radius: 16px;
  padding: 14px 12px 8px;
  box-shadow: 0 2px 10px rgba(31,42,38,0.04);
}
.preview-block-header {
  padding: 4px 8px 12px;
  border-bottom: 1px solid #f1eadb;
  margin-bottom: 6px;
}
.preview-block-num {
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.preview-block-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2px;
}
.preview-day-list { display: flex; flex-direction: column; }
.preview-day {
  display: grid;
  grid-template-columns: 32px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 8px;
  border-radius: 10px;
  transition: background .15s;
}
.preview-day[data-jump-day] { cursor: pointer; }
.preview-day[data-jump-day]:active { transform: scale(0.99); }
.preview-day[data-jump-day]:hover { background: var(--accent-bg); }
.preview-day-num {
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
  border-radius: 8px;
  text-align: center;
  padding: 4px 0;
  line-height: 1.2;
}
.preview-day.done .preview-day-num {
  background: var(--accent);
  color: #fff;
}
.preview-day.done .preview-day-lock {
  color: var(--accent);
  font-size: 16px;
  font-weight: 800;
  opacity: 1;
}
.preview-day.unlocked .preview-day-lock {
  color: var(--gold);
  font-size: 15px;
  opacity: 0.7;
}
.preview-day.locked { opacity: 0.55; }
.preview-day-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.preview-day-ref {
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 600;
}
.preview-day-lock {
  font-size: 13px;
  opacity: 0.55;
}

.trilha-preview-accept-btn {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  font-size: 16px;
  margin-top: 8px;
  margin-bottom: 16px;
}

/* ============ PROGRESSO (CALENDÁRIO) ============ */
.progress-panel { display: block; }
.progress-panel.hidden { display: none; }

.cal-card {
  background: #fff;
  border-radius: 18px;
  padding: 16px 14px;
  box-shadow: 0 2px 14px rgba(31,42,38,0.06);
  margin-top: 14px;
}
.cal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.cal-month {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  text-transform: capitalize;
}
.cal-nav {
  width: 36px; height: 36px;
  border: 0;
  background: #fbe5e5;
  color: #e57373;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.cal-nav:active { transform: scale(0.95); }
.cal-today-btn {
  border: 0;
  background: #fbe5e5;
  color: #e57373;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.cal-today-btn:active { transform: scale(0.97); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-wd {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.6px;
  padding: 4px 0 6px;
}
.cal-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: inherit;
}
.cal-cell.empty { cursor: default; visibility: hidden; }
.cal-cell.today {
  background: #fbe5e5;
}
.cal-cell.today .cal-num { color: #d84a4a; font-weight: 700; }
.cal-cell:not(.empty):not(.today):not(:disabled):hover { background: var(--accent-bg); }
.cal-cell:disabled { cursor: not-allowed; opacity: 0.7; }
.cal-num {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}
.cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-top: 4px;
}
.cal-dot.done { background: #4caf50; }
.cal-dot.pending { background: #f1b900; }
.cal-dot.locked { background: #cfc7b5; }

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f1eadb;
  font-size: 12px;
  color: var(--ink-soft);
}
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-done { background: #4caf50; }
.dot-pending { background: #f1b900; }
.dot-locked { background: #cfc7b5; }
.dot-today { background: #fbe5e5; box-shadow: inset 0 0 0 1px #e57373; }

.progress-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pstat {
  border-radius: 16px;
  padding: 14px 14px 12px;
  box-shadow: 0 2px 12px rgba(31,42,38,0.05);
  position: relative;
  overflow: hidden;
}
.pstat-orange { background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%); }
.pstat-purple { background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%); }
.pstat-green  { background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%); }
.pstat-pink   { background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%); }
.pstat-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.pstat-icon { font-size: 18px; line-height: 1; }
.pstat-label { font-size: 11px; font-weight: 800; letter-spacing: 0.7px; }
.pstat-orange .pstat-label { color: #e65100; }
.pstat-purple .pstat-label { color: #6a1b9a; }
.pstat-green  .pstat-label { color: #2e7d32; }
.pstat-pink   .pstat-label { color: #ad1457; }
.pstat-value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.5px;
}
.pstat-orange .pstat-value { color: #e65100; }
.pstat-purple .pstat-value { color: #6a1b9a; }
.pstat-green  .pstat-value { color: #2e7d32; }
.pstat-pink   .pstat-value { color: #ad1457; }
.pstat-sub {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 4px;
  font-weight: 500;
}
.pstat-orange .pstat-sub { color: #b65400; opacity: 0.85; }
.pstat-purple .pstat-sub { color: #6a1b9a; opacity: 0.75; }
.pstat-green  .pstat-sub { color: #2e7d32; opacity: 0.8; }
.pstat-pink   .pstat-sub { color: #ad1457; opacity: 0.8; }

/* ============ MINHA CONTA ============ */
.account-card {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
  color: #fff;
  border-radius: 18px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  flex: 0 0 auto;
  text-transform: uppercase;
}
.account-info { min-width: 0; }
.account-name { font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.account-email { font-size: 13px; opacity: 0.85; word-break: break-all; }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(31,42,38,0.05);
  text-align: center;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.stat-label {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px 12px;
}
.section-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--ink);
}
.section-counter {
  background: var(--accent-bg);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
@media (min-width: 540px) {
  .achievements-grid { grid-template-columns: repeat(3, 1fr); }
}
.achievement {
  background: #fff;
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(31,42,38,0.05);
  transition: transform .15s;
  position: relative;
  overflow: hidden;
}
.achievement.unlocked {
  background: linear-gradient(135deg, #fff 0%, #faf5e9 100%);
  border: 2px solid var(--gold);
}
.achievement.locked { opacity: 0.55; filter: grayscale(0.6); }
.achievement-icon {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 6px;
}
.achievement-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.2;
}
.achievement-desc {
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.3;
}
.achievement-progress {
  margin-top: 8px;
  height: 4px;
  background: var(--accent-bg);
  border-radius: 999px;
  overflow: hidden;
}
.achievement-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}
.achievement.unlocked .achievement-progress-fill { background: var(--gold); }
.achievement-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 14px;
}

.btn-secondary {
  width: 100%;
  border: 1px solid #e1dccf;
  background: #fff;
  color: var(--ink-soft);
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-secondary:hover { color: var(--danger); border-color: var(--danger); }
.logout-btn { margin-top: 8px; }

@media (max-width: 480px) {
  .app-view { padding: 12px 12px calc(80px + env(safe-area-inset-bottom)); }
  .verse-text { font-size: 17px; }
  .day-title { font-size: 20px; }
  .stat-value { font-size: 24px; }
}
