@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400;1,600&family=DM+Sans:wght@300;400;500&display=swap');

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

:root {
  --rose: #c2607a;
  --rose-dark: #3a0f1e;
  --rose-mid: #7a2d45;
  --rose-light: #e8b4c0;
  --rose-soft: #fdf0f3;
  --rose-pale: #fdf7f8;
  --gold: #c9a84c;
  --gold-light: #f5e9c8;
  --cream: #fdf8f5;
  --white: #ffffff;
  --text: #2e1520;
  --text-muted: #8a6070;
  --border: rgba(194,96,122,0.14);
  --radius: 18px;
  --radius-sm: 11px;
  --nav-h: 68px;
}

html, body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: #1a0a12;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

.app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* HEADER */
.header {
  background: linear-gradient(160deg, #3a0f1e 0%, #6a2038 100%);
  padding: 1rem 1.25rem 0;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(194,96,122,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.logo-text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: white;
}

.logo-text span {
  font-size: 0.67rem;
  color: rgba(255,255,255,0.5);
}

/* PLAYER */
.player {
  background: rgba(255,255,255,0.07);
  border-radius: 12px 12px 0 0;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2s infinite;
}

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

.player-info { flex: 1; }
.player-info strong { display: block; color: white; font-size: 0.78rem; font-weight: 500; }
.player-info span { font-size: 0.67rem; color: rgba(255,255,255,0.45); }

.play-btn {
  width: 33px;
  height: 33px;
  background: var(--rose);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
}

.play-btn:hover { transform: scale(1.08); }
.play-btn.playing { background: #059669; }

.play-indicator { display: none; align-items: center; gap: 2px; height: 14px; }
.play-indicator.show { display: flex; }
.play-bar { width: 3px; background: #4ade80; border-radius: 2px; animation: bounce 0.8s ease infinite; }
.play-bar:nth-child(2){animation-delay:.15s} .play-bar:nth-child(3){animation-delay:.3s}
@keyframes bounce { 0%,100%{height:4px} 50%{height:14px} }

/* CONTENT */
.content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(var(--nav-h) + 0.5rem);
}

.screen { display: none; }
.screen.active { display: block; }

.section-pad { padding: 1.25rem; }
.section-pad + .section-pad { padding-top: 0; }

.label {
  font-size: 0.62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* DEVOCIONAL */
.devo-card {
  background: linear-gradient(150deg, #3a0f1e 0%, #6a2038 100%);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: white;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.devo-card::before {
  content: '🌸';
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
  font-size: 4.5rem;
  opacity: 0.07;
  line-height: 1;
}

.devo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.devo-date { font-size: 0.67rem; color: rgba(255,255,255,0.45); }

.devo-badge {
  font-size: 0.62rem;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(194,96,122,0.3);
  color: var(--rose-light);
  border: 1px solid rgba(194,96,122,0.4);
}

.devo-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.875rem;
}

.devo-quote {
  background: rgba(255,255,255,0.08);
  border-left: 2px solid var(--rose);
  border-radius: 0 8px 8px 0;
  padding: 0.875rem 1rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(255,255,255,0.88);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.devo-quote cite {
  display: block;
  font-style: normal;
  font-size: 0.68rem;
  color: var(--rose-light);
  margin-top: 0.5rem;
  font-family: 'DM Sans', sans-serif;
}

.devo-text {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.68);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.devo-psico {
  background: rgba(194,96,122,0.15);
  border: 1px solid rgba(194,96,122,0.25);
  border-radius: 10px;
  padding: 0.875rem;
  margin-bottom: 1.25rem;
}

.devo-psico-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rose-light);
  margin-bottom: 0.4rem;
}

.devo-psico p { font-size: 0.8rem; color: rgba(255,255,255,0.75); line-height: 1.65; }

.btn-primary {
  background: var(--rose);
  color: white;
  border: none;
  border-radius: 100px;
  padding: 9px 20px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  display: inline-block;
  text-decoration: none;
}

.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--rose);
  border: 1px solid var(--rose);
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline:hover { background: var(--rose); color: white; }

.btn-full {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: none;
  background: var(--rose);
  color: white;
  transition: opacity 0.2s;
}

.btn-full:hover { opacity: 0.88; }

/* STREAK */
.streak-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.streak-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 0.5rem;
  text-align: center;
}

.streak-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--rose);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.streak-lbl { font-size: 0.62rem; color: var(--text-muted); line-height: 1.4; }

.days-row {
  display: flex;
  gap: 5px;
  margin-bottom: 1.25rem;
}

.day-dot {
  flex: 1;
  aspect-ratio: 1;
  max-width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 500;
}

.day-done { background: var(--rose); color: white; }
.day-today { background: var(--rose-soft); color: var(--rose); border: 2px solid var(--rose); }
.day-empty { background: white; color: var(--text-muted); border: 1px solid var(--border); }

/* CARDS */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.card-header h3 { font-size: 0.88rem; font-weight: 500; }
.card-header a, .card-link { font-size: 0.73rem; color: var(--rose); text-decoration: none; cursor: pointer; border: none; background: none; font-family: 'DM Sans', sans-serif; padding: 0; }

/* MENSAGEM ESPÍRITA */
.msg-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 0.875rem;
}

.msg-autor {
  font-size: 0.62rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rose);
  margin-bottom: 0.6rem;
}

.msg-texto {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 0.875rem;
}

.msg-tema {
  display: inline-block;
  font-size: 0.62rem;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--rose-soft);
  color: var(--rose);
  font-weight: 500;
}

.msg-reflexao {
  background: var(--gold-light);
  border-radius: 8px;
  padding: 0.75rem;
  margin-top: 0.75rem;
}

.msg-reflexao-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #78530a;
  margin-bottom: 0.3rem;
}

.msg-reflexao p { font-size: 0.775rem; color: #5c3f0a; line-height: 1.6; }

.btn-nova-msg {
  width: 100%;
  padding: 10px;
  background: var(--rose-soft);
  color: var(--rose);
  border: 1px dashed var(--rose);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  text-align: center;
  margin-top: 0.5rem;
  transition: all 0.2s;
}

.btn-nova-msg:hover { background: var(--rose); color: white; border-style: solid; }

/* FILTROS */
.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 1.25rem 0.875rem;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-muted);
  font-size: 0.73rem;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.filter-btn.active { background: var(--rose); color: white; border-color: var(--rose); }

/* METÁFORAS */
.metafora-card {
  background: linear-gradient(135deg, var(--rose-pale) 0%, #fce8ee 100%);
  border: 1px solid rgba(194,96,122,0.2);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 0.875rem;
}

.metafora-icon { font-size: 2rem; margin-bottom: 0.75rem; display: block; }

.metafora-texto {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--rose-dark);
  line-height: 1.75;
  margin-bottom: 0.875rem;
}

.metafora-reflexao {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.65;
  border-top: 1px solid rgba(194,96,122,0.15);
  padding-top: 0.75rem;
}

.metafora-reflexao strong { color: var(--rose-mid); font-weight: 500; }

/* REFLEXÃO */
.reflexao-card {
  background: linear-gradient(150deg, #3a0f1e 0%, #6a2038 100%);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: white;
  margin-bottom: 1rem;
}

.reflexao-cat {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rose-light);
  margin-bottom: 0.75rem;
}

.reflexao-pergunta {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.reflexao-area {
  width: 100%;
  min-height: 100px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
  color: white;
  font-size: 0.85rem;
  font-family: 'DM Sans', sans-serif;
  resize: none;
  outline: none;
  line-height: 1.6;
  transition: border-color 0.2s;
}

.reflexao-area:focus { border-color: var(--rose); }
.reflexao-area::placeholder { color: rgba(255,255,255,0.35); }

.btn-row { display: flex; gap: 8px; margin-top: 0.75rem; }
.btn-row .btn-primary { flex: 2; text-align: center; }
.btn-row .btn-share {
  flex: 1;
  background: rgba(255,255,255,0.12);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 0.78rem;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  text-align: center;
}

/* FORMULÁRIO */
.form-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.form-label {
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: block;
}

.form-input, .form-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
  font-size: 0.85rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--cream);
  outline: none;
  line-height: 1.6;
  transition: border-color 0.2s;
  margin-bottom: 0.75rem;
}

.form-input:focus, .form-textarea:focus { border-color: var(--rose); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: none; min-height: 90px; }

/* PROGRAMAÇÃO */
.prog-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.prog-item:last-child { border-bottom: none; }

.prog-hora {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--rose);
  min-width: 44px;
}

.prog-info { flex: 1; }
.prog-nome { font-size: 0.85rem; font-weight: 500; color: var(--text); }
.prog-apres { font-size: 0.7rem; color: var(--text-muted); }

.prog-dia {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rose);
  padding: 0.5rem 1.25rem;
  background: var(--rose-soft);
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

/* ANUNCIANTES */
.anunc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; padding: 0 1.25rem; }

.anunc-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: transform 0.2s;
}

.anunc-card:hover { transform: translateY(-2px); }
.anunc-img { width: 100%; height: 80px; object-fit: cover; background: var(--rose-soft); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.75rem; }
.anunc-nome { padding: 0.5rem; font-size: 0.75rem; font-weight: 500; color: var(--text); }

/* PIX / DOAÇÃO */
.pix-card {
  background: linear-gradient(135deg, var(--rose-soft), #fce8ee);
  border: 1px solid rgba(194,96,122,0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
}

.pix-icon { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }
.pix-title { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; color: var(--rose-dark); margin-bottom: 0.5rem; }
.pix-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1rem; }
.pix-key { background: white; border: 1px dashed var(--rose); border-radius: 8px; padding: 0.75rem; font-size: 0.8rem; font-family: monospace; color: var(--rose-dark); margin-bottom: 1rem; word-break: break-all; }

/* TOAST */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--rose-dark);
  color: white;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 0.8rem;
  opacity: 0;
  transition: all 0.3s;
  z-index: 100;
  max-width: 360px;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(58,15,30,0.7);
  z-index: 50;
  align-items: flex-end;
  max-width: 430px;
  margin: 0 auto;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--cream);
  border-radius: 24px 24px 0 0;
  padding: 1.5rem;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 1.25rem; }

.modal h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--rose-dark);
  margin-bottom: 0.35rem;
}

.modal-meta { font-size: 0.68rem; color: var(--text-muted); margin-bottom: 1rem; }

.modal-quote {
  background: var(--rose-soft);
  border-left: 3px solid var(--rose);
  border-radius: 0 8px 8px 0;
  padding: 0.875rem 1rem;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.975rem;
  color: var(--rose-dark);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.modal-quote cite { display: block; font-style: normal; font-size: 0.68rem; color: var(--rose); margin-top: 0.5rem; font-family: 'DM Sans', sans-serif; }
.modal-body { font-size: 0.875rem; color: var(--text); line-height: 1.8; margin-bottom: 1rem; }

.modal-psico {
  background: var(--gold-light);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.modal-psico-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; color: #78530a; margin-bottom: 0.4rem; font-weight: 500; }
.modal-psico p { font-size: 0.835rem; color: #5c3f0a; line-height: 1.7; }
.modal-reflexao { font-size: 0.8rem; font-style: italic; color: var(--text-muted); margin-bottom: 1.25rem; border-top: 1px solid var(--border); padding-top: 1rem; line-height: 1.65; }

/* NAV */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--nav-h);
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 30;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.58rem;
  font-family: 'DM Sans', sans-serif;
  transition: color 0.2s;
  padding: 8px 0;
  text-decoration: none;
}

.nav-item .nav-icon { font-size: 1.3rem; line-height: 1; }
.nav-item.active { color: var(--rose); }

/* SCROLLBAR */
.content::-webkit-scrollbar { width: 3px; }
.content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* AUTORES GRID */
.autores-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }

.autor-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
}

.autor-card:hover, .autor-card.active { border-color: var(--rose); background: var(--rose-soft); }
.autor-card.active { outline: 2px solid var(--rose); }
.autor-icon { font-size: 1.4rem; margin-bottom: 0.4rem; display: block; }
.autor-nome { font-size: 0.8rem; font-weight: 500; color: var(--text); margin-bottom: 0.2rem; }
.autor-desc { font-size: 0.67rem; color: var(--text-muted); line-height: 1.4; }

/* WEBTV */
.webtv-player { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }
.webtv-player iframe { width: 100%; height: 100%; border: none; }
.webtv-placeholder { width: 100%; aspect-ratio: 16/9; background: var(--rose-dark); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; color: rgba(255,255,255,0.5); font-size: 0.85rem; margin-bottom: 1rem; }

@media(max-width: 430px) {
  .bottom-nav { max-width: 100%; }
  .modal-overlay { max-width: 100%; }
}
