/* ==========================================================================
   IPBV — Design tokens
   Verde extraído diretamente da logomarca oficial (#004600).
   Tipografia: Cormorant Garamond (display, evoca as letras do templo gótico)
   + Inter (texto corrido, alta legibilidade em tela).
   Elemento-assinatura: o arco ogival (arco em ponta) do frontispício do
   templo, usado como recorte de topo em cartões e no botão principal —
   e o rosáceo (janela circular) como divisor decorativo.
   ========================================================================== */

:root {
  --ipbv-green-900: #002b00;
  --ipbv-green-800: #004600;
  --ipbv-green-700: #0b5c17;
  --ipbv-green-600: #1a7a2e;
  --ipbv-green-400: #4fa361;
  --ipbv-green-200: #b9dcc0;
  --ipbv-white: #ffffff;
  --ipbv-offwhite: #f6faf6;
  --ipbv-ink: #10241a;
  --ipbv-ink-soft: #3c4f44;
  --ipbv-line: rgba(0, 70, 0, 0.14);
  --ipbv-shadow: 0 10px 30px rgba(0, 43, 0, 0.16);
  --ipbv-radius: 18px;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--ipbv-offwhite);
  color: var(--ipbv-ink);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

body {
  min-height: 100dvh;
  background: linear-gradient(180deg, #eaf4ec 0%, var(--ipbv-offwhite) 260px, var(--ipbv-offwhite) 100%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- App shell ---------- */
.app {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(14px + var(--safe-top)) 20px 12px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, #eaf4ec 0%, #eaf4ec 80%, transparent 100%);
}

.topbar__brand {
  display: none;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.topbar__brand.is-visible { display: flex; }

.topbar__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ipbv-white);
  border: 1px solid var(--ipbv-line);
  object-fit: contain;
  padding: 4px;
}

.topbar__meta { display: flex; flex-direction: column; line-height: 1.25; }
.topbar__name { font-size: 14.5px; font-weight: 700; color: var(--ipbv-ink); }
.topbar__loc { font-size: 12px; color: var(--ipbv-ink-soft); }

.topbar__back {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--ipbv-line);
  background: var(--ipbv-white);
  color: var(--ipbv-green-800);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  cursor: pointer;
  flex: none;
}
.topbar__back.is-visible { display: inline-flex; }
.topbar__back:active { transform: scale(0.94); }

.topbar__title {
  display: none;
  color: var(--ipbv-ink);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.01em;
  flex: 1;
}
.topbar__title.is-visible { display: block; }

.topbar__bell {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--ipbv-line);
  background: var(--ipbv-white);
  color: var(--ipbv-green-800);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  position: relative;
}
.topbar__bell:active { transform: scale(0.94); }
.topbar__bell.is-active {
  background: var(--ipbv-green-800);
  border-color: var(--ipbv-green-800);
  color: var(--ipbv-white);
}

.topbar__bell-badge {
  display: none;
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #d1372f;
  color: #fff;
  border: 2px solid var(--ipbv-offwhite);
  font-size: 10px;
  font-weight: 700;
  line-height: 13px;
  text-align: center;
}
.topbar__bell-badge.is-visible { display: block; }

/* ---------- Hero card ---------- */
.hero-card {
  margin: 4px 20px 4px;
  padding: 22px 22px 24px;
  border-radius: 24px;
  background:
    radial-gradient(420px 220px at 90% -20%, var(--ipbv-green-400) 0%, transparent 60%),
    linear-gradient(155deg, var(--ipbv-green-900) 0%, var(--ipbv-green-800) 45%, var(--ipbv-green-600) 100%);
  color: var(--ipbv-white);
  box-shadow: 0 14px 34px rgba(0, 43, 0, 0.22);
}

.hero-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  padding: 6px 12px 6px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.hero-card__badge i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #7be08a; display: inline-block;
}

.hero-card__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 6.5vw, 32px);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 8px;
}

.hero-card__text {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,0.86);
  margin: 0 0 20px;
  max-width: 46ch;
}

.hero-card__ctas { display: flex; gap: 10px; flex-wrap: wrap; }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 30px;
  padding: 12px 18px;
  font-size: 13.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.pill-btn svg { width: 16px; height: 16px; flex: none; }
.pill-btn--solid { background: var(--ipbv-white); color: var(--ipbv-green-800); }
.pill-btn--ghost {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--ipbv-white);
}
.pill-btn:active { transform: scale(0.97); }

.hero-card--contribute {
  margin: 22px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 20px;
  flex-wrap: wrap;
}
.hero-card--contribute .hero-card--contribute__text h2 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 4px;
  color: var(--ipbv-white);
}
.hero-card--contribute__text p {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.86);
  margin: 0;
  max-width: 32ch;
}
.hero-card--contribute .pill-btn { flex: none; }

.hero-card--location {
  margin: 0 20px calc(20px + var(--safe-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 20px;
  flex-wrap: wrap;
}
.hero-card--location .hero-card--location__text h2 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 4px;
  color: var(--ipbv-white);
}
.hero-card--location__text p {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.86);
  margin: 0;
  max-width: 34ch;
}
.hero-card--location__contato { margin-top: 6px !important; }
.hero-card--location__ctas {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero-card--location .pill-btn { flex: none; white-space: nowrap; }

/* ---------- Explorar label row ---------- */
.section-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 22px 20px 10px;
}
.section-hint {
  font-size: 12px;
  color: var(--ipbv-ink-soft);
}

/* ---------- Grid of buttons ---------- */
.menu {
  padding: 0 20px 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-content: start;
}

@media (max-width: 380px) {
  .menu { grid-template-columns: repeat(2, 1fr); }
}

/* landscape phones: widen grid */
@media (orientation: landscape) and (max-height: 480px) {
  .menu { grid-template-columns: repeat(4, 1fr); }
}

.tile {
  position: relative;
  background: var(--ipbv-white);
  border: 1px solid var(--ipbv-line);
  border-radius: 18px;
  padding: 18px 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,43,0,0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--ipbv-shadow); }
.tile:active { transform: translateY(0); }

.tile__icon {
  width: 48px;
  height: 48px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ipbv-green-200);
  border-radius: 14px;
  color: var(--ipbv-green-800);
}
.tile__icon svg { width: 24px; height: 24px; }
.tile__icon img { width: 24px; height: 24px; object-fit: contain; }

.tile__label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ipbv-ink);
  line-height: 1.25;
}

.tile__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e5484d;
}
.tile__badge.is-live-pulsing {
  box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.7);
  animation: tileLivePulse 1.6s infinite;
}
@keyframes tileLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(229, 72, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); }
}

.tile__count {
  display: none;
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e5484d;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.tile__count.is-visible { display: block; }

/* ---------- Pages ---------- */
.page {
  display: none;
  flex: 1;
  flex-direction: column;
  padding: 20px 20px calc(40px + var(--safe-bottom));
  animation: page-in 0.22s ease;
}
.page.is-active { display: flex; }

#page-home { padding: 0 0 8px; }

@keyframes page-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.page h2 {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 4px 0 4px;
  color: var(--ipbv-green-800);
}

.page__intro {
  color: var(--ipbv-ink-soft);
  font-size: 14.5px;
  margin: 0 0 18px;
  line-height: 1.5;
}

/* ---------- Visor interno (Boletins, Documentos, Eventos) ---------- */
.page--embed { padding-bottom: calc(16px + var(--safe-bottom)); }
.embed-frame {
  flex: 1;
  width: 100%;
  min-height: 60vh;
  border: 1px solid rgba(0, 43, 0, 0.1);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--ipbv-shadow);
}


/* ---------- Lista de arquivos (Boletins ordenados por data) ---------- */
.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.file-row:hover { transform: translateY(-1px); box-shadow: var(--ipbv-shadow); }
.file-row__icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--ipbv-green-50, #eef6ee);
  color: var(--ipbv-green-700);
}
.file-row__icon svg { width: 20px; height: 20px; }
.file-row__info { display: flex; flex-direction: column; min-width: 0; }
.file-row__name {
  font-weight: 700;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-row__date { font-size: 12.5px; color: var(--ipbv-ink-soft); margin-top: 2px; }

.divider-rosace {
  width: 30px;
  height: 30px;
  margin: 4px 0 18px;
  opacity: 0.5;
}

.prose {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--ipbv-ink);
  white-space: pre-line;
}
.prose p { margin: 0 0 1em; }

/* ---------- Player da Rádio IPB ---------- */
.radio-player {
  background: var(--ipbv-white);
  border: 1px solid var(--ipbv-line);
  border-radius: var(--ipbv-radius);
  box-shadow: var(--ipbv-shadow);
  padding: 28px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.radio-player__art {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, var(--ipbv-green-700) 0%, var(--ipbv-green-400) 100%);
  color: var(--ipbv-white);
}
.radio-player__art svg { width: 40px; height: 40px; }
.radio-player__status {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ipbv-ink-soft);
  min-height: 18px;
}
.radio-player__controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 4px;
}
.radio-player__playbtn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: none;
  background: var(--ipbv-green-800);
  color: var(--ipbv-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.radio-player__playbtn:hover { filter: brightness(1.1); }
.radio-player__playbtn:active { transform: scale(0.96); }
.radio-player__playbtn svg { width: 28px; height: 28px; }
.radio-player__volume {
  width: 100%;
  max-width: 280px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.radio-player__volbtn {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--ipbv-green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.radio-player__volbtn svg { width: 20px; height: 20px; }
.radio-player__slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--ipbv-green-200);
  outline: none;
}
.radio-player__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ipbv-green-800);
  cursor: pointer;
  border: none;
}
.radio-player__slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ipbv-green-800);
  cursor: pointer;
  border: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  border-radius: 14px;
  border: none;
  background: var(--ipbv-green-800);
  color: var(--ipbv-white);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  width: 100%;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(0.98); }
.btn.secondary {
  background: var(--ipbv-white);
  color: var(--ipbv-green-800);
  border: 1.5px solid var(--ipbv-green-800);
}
.btn.ghost {
  background: transparent;
  color: var(--ipbv-green-700);
  border: 1px solid var(--ipbv-line);
}
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }

.btn-center { display: flex; justify-content: center; }
.btn-center .btn { width: auto; min-width: 220px; padding-left: 32px; padding-right: 32px; }

/* ---------- Cards / lists ---------- */
.card {
  background: var(--ipbv-white);
  border: 1px solid var(--ipbv-line);
  border-radius: 16px;
  padding: 16px 18px;
}

.event-card { padding: 0; overflow: hidden; }
.event-card__cover {
  height: 108px;
  background: linear-gradient(135deg, var(--ipbv-green-700), var(--ipbv-green-400));
  display: flex;
  align-items: flex-end;
  padding: 12px 16px;
}
.event-card__date {
  color: var(--ipbv-white);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}
.event-card__body { padding: 14px 16px 16px; cursor: pointer; }
.event-card__title { font-weight: 700; font-size: 15.5px; margin: 0 0 2px; }
.event-card__meta { font-size: 12.5px; color: var(--ipbv-ink-soft); margin: 0; }
.event-card__desc {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  font-size: 14px;
  color: var(--ipbv-ink-soft);
  line-height: 1.55;
}
.event-card__desc.is-open { max-height: 4000px; margin-top: 10px; }

/* ---------- Postagens do blog de Eventos (com o layout do app) ---------- */
.post-card__cover {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--ipbv-green-700), var(--ipbv-green-400));
}
.post-card .event-card__desc :is(p, div) { margin: 0 0 10px; }
.post-card .event-card__desc img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 6px 0;
  display: block;
}
.post-card .event-card__desc a:not(.btn) { color: var(--ipbv-green-700); font-weight: 600; }

/* ---------- Boletins (feed com miniatura do PDF) ---------- */
.boletim-card__cover {
  display: flex;
  align-items: center;
  justify-content: center;
}
.boletim-card__cover svg { width: 40px; height: 40px; color: var(--ipbv-white); opacity: 0.9; }

/* ---------- Pix ---------- */
.pix-info dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ipbv-ink-soft); margin-top: 10px; }
.pix-info dd { font-size: 15.5px; font-weight: 600; margin: 2px 0 0; }
.pix-key-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--ipbv-green-200);
  border-radius: 12px;
  padding: 12px 14px;
}
.pix-key-box code { font-size: 14px; font-weight: 700; word-break: break-all; }
.copy-btn {
  border: none;
  background: var(--ipbv-green-800);
  color: white;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label { font-size: 12.5px; font-weight: 600; color: var(--ipbv-ink-soft); }
.field input {
  padding: 13px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--ipbv-line);
  font-size: 16px;
  background: var(--ipbv-white);
}
.field input:focus { outline: 2px solid var(--ipbv-green-600); outline-offset: 1px; }

#pixQr {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: var(--ipbv-white);
  border-radius: 16px;
  border: 1px solid var(--ipbv-line);
}
#pixQr img { border-radius: 6px; }

/* ---------- Sub-tiles (redes sociais, biblia/hinário) ---------- */
.sub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ---------- Leadership ---------- */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}
.person {
  text-align: center;
}
.person__photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--ipbv-green-200), var(--ipbv-white));
  border: 1px solid var(--ipbv-line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ipbv-green-700);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  overflow: hidden;
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; }
.person__name { font-size: 13.5px; font-weight: 700; margin: 0; }
.person__role { font-size: 11.5px; color: var(--ipbv-ink-soft); margin: 2px 0 0; }

.society {
  border-left: 3px solid var(--ipbv-green-600);
  padding-left: 12px;
  margin-bottom: 4px;
}
.society h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 20px; color: var(--ipbv-green-800); }
.society p { margin: 0; font-size: 14px; color: var(--ipbv-ink-soft); line-height: 1.5; }

.group-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ipbv-white);
  border: 1px solid var(--ipbv-line);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}
.group-btn:active { transform: scale(0.99); }
.group-btn[aria-expanded="true"] {
  border-color: var(--ipbv-green-600);
  background: var(--ipbv-green-200);
}
.group-btn__sigla {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ipbv-green-800);
  color: var(--ipbv-white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.group-btn__nome { flex: 1; font-size: 14.5px; font-weight: 600; }
.group-btn__seta {
  flex: none;
  color: var(--ipbv-green-700);
  transition: transform 0.2s ease;
}
.group-btn[aria-expanded="true"] .group-btn__seta { transform: rotate(180deg); }

.group-panel {
  padding: 4px 4px 14px;
}
.group-panel__desc {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--ipbv-ink-soft);
  line-height: 1.5;
}
.group-panel__empty {
  margin: 0;
  font-size: 13px;
  color: var(--ipbv-ink-soft);
  font-style: italic;
}

.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ipbv-green-700);
  font-weight: 700;
  margin: 22px 0 10px;
}
.section-label:first-child { margin-top: 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  transform: translate(-50%, 12px);
  background: var(--ipbv-ink);
  color: white;
  padding: 12px 18px;
  border-radius: 30px;
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Install banner ---------- */
.install-banner {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(16px + var(--safe-bottom));
  max-width: 688px;
  margin: 0 auto;
  background: var(--ipbv-white);
  border: 1px solid var(--ipbv-line);
  border-radius: 16px;
  padding: 14px 16px;
  display: none;
  align-items: center;
  gap: 12px;
  box-shadow: var(--ipbv-shadow);
  z-index: 90;
}
.install-banner.is-visible { display: flex; }
.install-banner img { width: 34px; height: 34px; }
.install-banner__text { flex: 1; font-size: 13px; line-height: 1.35; }
.install-banner__text strong { display: block; font-size: 14px; }
.install-banner button.btn { width: auto; padding: 10px 16px; font-size: 13px; }
.install-banner__close {
  background: none; border: none; color: var(--ipbv-ink-soft);
  font-size: 18px; cursor: pointer; padding: 4px;
}

/* ---------- Mini player flutuante da Rádio IPB ---------- */
.radio-mini {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(16px + var(--safe-bottom));
  max-width: 688px;
  margin: 0 auto;
  background: var(--ipbv-green-800);
  color: var(--ipbv-white);
  border-radius: 16px;
  padding: 10px 12px 10px 14px;
  display: none;
  align-items: center;
  gap: 12px;
  box-shadow: var(--ipbv-shadow);
  z-index: 95;
  cursor: pointer;
}
.radio-mini.is-visible { display: flex; }
.radio-mini__icon {
  flex: none;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.radio-mini__icon svg { width: 22px; height: 22px; }
.radio-mini__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  line-height: 1.3;
}
.radio-mini__text strong { font-size: 14px; }
.radio-mini__text span { color: rgba(255,255,255,0.8); font-size: 12px; }
.radio-mini__btn {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.16);
  color: var(--ipbv-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.radio-mini__btn svg { width: 18px; height: 18px; }
.radio-mini__close {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: none;
  color: rgba(255,255,255,0.75);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.radio-mini__close:hover { color: var(--ipbv-white); }

.radio-mini--podcast {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  cursor: default;
  padding: 10px 12px 8px 14px;
}
.radio-mini__row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.podcast-mini__seek {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
}
.podcast-mini__time {
  flex: none;
  font-size: 10.5px;
  color: rgba(255,255,255,0.8);
  min-width: 28px;
}
.podcast-mini__time:last-child { text-align: right; }
.podcast-mini__seek input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.28);
  cursor: pointer;
}
.podcast-mini__seek input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--ipbv-white);
  cursor: pointer;
}
.podcast-mini__seek input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: none;
  border-radius: 50%;
  background: var(--ipbv-white);
  cursor: pointer;
}

/* ---------- Episódios de podcast ---------- */
.podcast-ep {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: var(--ipbv-white);
  border: 1px solid var(--ipbv-line);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
}
.podcast-ep:hover { background: var(--ipbv-offwhite); }
.podcast-ep__play {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ipbv-green-800);
  color: var(--ipbv-white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.podcast-ep__play svg { width: 15px; height: 15px; }
.podcast-ep__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.podcast-ep__title { font-size: 13.5px; font-weight: 600; color: var(--ipbv-ink); }
.podcast-ep__date { font-size: 11.5px; color: var(--ipbv-ink-soft); }

/* ---------- Central de notificações ---------- */
.notif-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 43, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 150;
}
.notif-overlay.is-open { opacity: 1; pointer-events: auto; }

.notif-panel {
  position: fixed;
  top: calc(64px + var(--safe-top));
  right: 14px;
  left: 14px;
  max-width: 360px;
  margin-left: auto;
  max-height: min(72vh, 520px);
  background: var(--ipbv-white);
  border: 1px solid var(--ipbv-line);
  border-radius: 18px;
  box-shadow: var(--ipbv-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 151;
}
.notif-panel.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.notif-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--ipbv-line);
  flex: none;
}
.notif-panel__head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ipbv-green-800);
}
.notif-panel__actions { display: flex; align-items: center; gap: 10px; flex: none; }
.notif-panel__toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--ipbv-line);
  flex: none;
}
.notif-panel__mark {
  background: none;
  border: none;
  color: var(--ipbv-green-700);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px;
}
.notif-panel__mark--danger { color: #b3261e; }
.notif-panel__close {
  background: none;
  border: none;
  color: var(--ipbv-ink-soft);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}

.notif-panel__list {
  overflow-y: auto;
  padding: 6px;
}

.notif-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 12px;
}
.notif-item:hover { background: var(--ipbv-offwhite); }
.notif-item__main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  background: none;
  border: none;
  border-radius: 12px;
  padding: 10px 6px 10px 10px;
  cursor: pointer;
}
.notif-item__delete {
  flex: none;
  width: 30px;
  height: 30px;
  margin-right: 6px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--ipbv-ink-soft);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-item__delete:hover { background: var(--ipbv-line); color: var(--ipbv-ink); }
.notif-item__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  background: transparent;
}
.notif-item.is-unread .notif-item__dot { background: var(--ipbv-green-600); }
.notif-item__img {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--ipbv-offwhite);
}
.notif-item__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-item__title { font-size: 13.5px; font-weight: 700; color: var(--ipbv-ink); }
.notif-item.is-unread .notif-item__title { color: var(--ipbv-green-800); }
.notif-item__msg {
  font-size: 12.5px;
  color: var(--ipbv-ink-soft);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-item__time { font-size: 11px; color: var(--ipbv-ink-soft); margin-top: 2px; }

.notif-panel__empty {
  display: none;
  margin: 0;
  padding: 30px 16px 34px;
  text-align: center;
  font-size: 13px;
  color: var(--ipbv-ink-soft);
}
.notif-panel__empty.is-visible { display: block; }

/* ---------- Modal padrão (aviso em destaque, detalhe de notificação) ---------- */
.ipbv-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 43, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 160;
}
.ipbv-modal-overlay.is-open { opacity: 1; pointer-events: auto; }

.ipbv-modal {
  position: fixed;
  left: 20px;
  right: 20px;
  top: 50%;
  max-width: 380px;
  margin: 0 auto;
  max-height: 82vh;
  overflow-y: auto;
  background: var(--ipbv-white);
  border-radius: 20px;
  box-shadow: var(--ipbv-shadow);
  opacity: 0;
  transform: translateY(-50%) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 161;
}
.ipbv-modal.is-open { opacity: 1; transform: translateY(-50%) scale(1); pointer-events: auto; }

.ipbv-modal__img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
}
.ipbv-modal__body { padding: 22px 20px 20px; }
.ipbv-modal__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ipbv-green-800);
}
.ipbv-modal__msg {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ipbv-ink);
  white-space: pre-line;
}
.ipbv-modal__actions { gap: 10px; }
.ipbv-modal__time {
  display: block;
  margin: -10px 0 14px;
  font-size: 12px;
  color: var(--ipbv-ink-soft);
}


/* Scrollbar polish */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: var(--ipbv-green-200); border-radius: 8px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .page { animation: none; }
  .tile { transition: none; }
}

/* Focus visibility for keyboard users */
a:focus-visible, button:focus-visible, .tile:focus-visible {
  outline: 3px solid var(--ipbv-green-400);
  outline-offset: 2px;
}
