/* Versi: visual claro (papel e amanhecer), marca em marca/marca.css. Sem emoji no layout; ícones em SVG. */
:root {
  --paper: #FBF5EC; --card: #ffffff; --ink: #2A2C63; --text: #2b2118; --hint: #8b7a68; --line: #efe5d6;
  --amber: #E58A3A; --amber-dark: #9a5a2a; --soft: #FBE6CF; --lilac: #E9E4F3; --rose: #F6DDE1;
  --top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --bottom: var(--tg-safe-area-inset-bottom, 0px);
  --serif: "Fraunces", Georgia, serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--paper); color: var(--text); font: 16px/1.45 var(--ui); }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

#splash {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--fundo-claro); transition: opacity .35s ease;
}
#splash .versi-logo { font-size: 56px; margin-top: -18px; }
#splash.gone { opacity: 0; pointer-events: none; }

header#top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: calc(12px + var(--top)) 18px 10px; background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
}
header .versi-logo { font-size: 28px; }
.badge { font-size: 11px; font-weight: 700; color: var(--amber-dark); background: var(--soft); border-radius: 99px; padding: 4px 9px; }
#languages { margin-left: auto; display: flex; background: #fff; border-radius: 99px; padding: 3px; box-shadow: 0 1px 3px rgba(60, 40, 20, .08); }
#languages button { border: 0; background: none; font-size: 12px; font-weight: 700; color: var(--hint); padding: 6px 10px; border-radius: 99px; min-width: 40px; min-height: 32px; }
#languages button[aria-pressed="true"] { background: var(--ink); color: #fff; }

main { max-width: 560px; margin: 0 auto; padding: 4px 16px calc(96px + var(--bottom)); }
h1 { font-family: var(--serif); font-weight: 600; font-size: 26px; color: var(--ink); margin: 6px 4px 14px; line-height: 1.2; }
h2.section { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--hint); font-weight: 700; margin: 22px 6px 10px; }
.hint { color: var(--hint); font-size: 14px; margin: 4px; }

/* versículo do dia */
.verse {
  border-radius: 26px; padding: 22px 20px 18px; color: var(--ink);
  background: radial-gradient(110% 80% at 80% 0%, #FFE7B8 0%, rgba(255, 231, 184, 0) 60%), linear-gradient(170deg, #FCE6C8 0%, #F0AE97 100%);
  box-shadow: 0 10px 30px rgba(200, 120, 80, .18);
}
.verse small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--amber-dark); }
.verse p { font-family: var(--serif); font-size: 23px; line-height: 1.32; margin: 10px 0 12px; min-height: 2.6em; }
.verse .ref { font-weight: 700; font-size: 14px; }
.credit { font-size: 11px; color: color-mix(in srgb, var(--ink) 65%, transparent); margin-top: 8px; }
.actions { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 13px; border: 0; border-radius: 99px;
  background: rgba(255, 255, 255, .55); color: var(--ink); font-weight: 600; font-size: 13.5px; white-space: nowrap;
}
.pill svg { width: 17px; height: 17px; }
.pill:active, .card:active { transform: scale(.98); }
.loading-text { opacity: .45; }

/* cartões da tela Hoje */
.card {
  width: 100%; display: flex; align-items: center; gap: 13px; text-align: left; margin: 0 0 10px; padding: 14px;
  border: 0; border-radius: 20px; background: var(--card); box-shadow: 0 1px 3px rgba(60, 40, 20, .07); color: var(--text); text-decoration: none;
  transition: transform .12s ease;
}
.card .body { flex: 1; min-width: 0; }
.card b { display: block; font-size: 15px; color: var(--ink); }
.card .body span { display: block; font-size: 13px; color: var(--hint); }
.thumb { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.thumb.t-plan { background: var(--soft); color: var(--amber-dark); }
.thumb.t-book { background: var(--lilac); color: #5b4a8c; }
.thumb.t-bell { background: var(--rose); color: #b9566a; }
.chev { color: var(--hint); width: 18px; height: 18px; }
.card.daily { flex-wrap: wrap; }
.daily-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-left: 61px; }
.daily-row label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--hint); }
select { font: inherit; font-size: 15px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-height: 40px; }
.why { width: 100%; padding-left: 61px; font-size: 12px; color: var(--hint); }

.primary { border: 0; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 700; min-height: 48px; padding: 0 18px; width: 100%; }
.primary.small { width: auto; min-height: 40px; font-size: 14px; border-radius: 12px; white-space: nowrap; }
.primary.on { background: var(--soft); color: var(--amber-dark); }
.primary:disabled { opacity: .5; }
.ghost { border: 1px solid var(--line); background: #fff; border-radius: 12px; min-height: 44px; padding: 0 16px; color: var(--ink); font-weight: 600; }

/* Bíblia */
.version-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 6px 0; font-size: 13px; color: var(--hint); }
#versions { display: flex; gap: 6px; }
#versions button { border: 1px solid var(--line); background: #fff; border-radius: 10px; font-size: 13px; font-weight: 700; padding: 6px 10px; min-height: 36px; color: var(--hint); }
#versions button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }
.book-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.book-grid button { border: 0; background: #fff; border-radius: 14px; padding: 12px; text-align: left; min-height: 48px; font-size: 15px; color: var(--ink); box-shadow: 0 1px 2px rgba(60, 40, 20, .06); }
.chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.chapter-grid button { border: 0; background: #fff; border-radius: 12px; min-height: 48px; font-weight: 600; color: var(--ink); box-shadow: 0 1px 2px rgba(60, 40, 20, .06); }
.reader-text { font-family: var(--serif); font-size: 19px; line-height: 1.65; color: #2b2118; padding: 0 4px; }
.reader-text sup { font-family: var(--ui); font-size: 11px; font-weight: 700; color: var(--amber); margin-right: 3px; }
.reader-text span.v { border-radius: 6px; transition: background .15s; }
.reader-text span.v.sel { background: #FFE7B8; }
.reader-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 22px 0 64px; }
#selbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + var(--bottom)); z-index: 6; display: flex; gap: 8px; background: var(--ink); padding: 8px; border-radius: 99px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
#selbar button { border: 0; background: rgba(255, 255, 255, .14); color: #fff; border-radius: 99px; padding: 0 14px; min-height: 40px; font-weight: 600; font-size: 14px; }

/* Planos */
.plan { width: 100%; text-align: left; border: 0; background: #fff; border-radius: 20px; padding: 16px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(60, 40, 20, .07); color: var(--text); }
.plan b { display: block; font-family: var(--serif); font-size: 19px; color: var(--ink); }
.plan span { display: block; font-size: 13px; color: var(--hint); margin-top: 2px; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 4px 4px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #F6C46A, var(--amber)); border-radius: 99px; width: 0; transition: width .3s ease; }
.day { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 12px; margin-bottom: 8px; }
.day.current { box-shadow: 0 0 0 2px var(--amber) inset; }
.day .check { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; background: #fff; padding: 0; }
.day .check.done { background: var(--amber); border-color: var(--amber); color: #fff; }
.day .check svg { width: 16px; height: 16px; stroke-width: 3; }
.day .what { flex: 1; min-width: 0; }
.day .what b { display: block; font-size: 13px; color: var(--hint); font-weight: 600; }
.day .what a { color: var(--ink); font-weight: 600; text-decoration: none; margin-right: 10px; display: inline-block; padding: 4px 0; }

/* Mais */
.support { background: var(--fundo-claro); border-radius: 26px; padding: 20px; text-align: center; color: var(--ink); }
.support h2 { font-family: var(--serif); margin: 6px 0; font-size: 22px; }
.support p { font-size: 14px; margin: 6px 0 12px; }
.supporter { font-weight: 700; }
.terms { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 13px; margin-bottom: 12px; }
details { margin: 14px 6px; font-size: 14px; }
summary { color: var(--ink); cursor: pointer; font-weight: 600; min-height: 32px; }
#terms-text { white-space: pre-line; color: var(--hint); font-size: 13px; }
.credits { white-space: pre-line; font-size: 12px; text-align: center; margin-top: 16px; }
.brand {
  display: flex; width: max-content; align-items: center; gap: 6px; margin: 18px auto 0; padding: 5px 12px 5px 9px;
  border-radius: 99px; background: #fff; color: var(--hint); text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1;
}
.brand img { width: 18px; height: 20px; display: block; margin: -2px 0; }
.brand b { font-weight: inherit; color: #ff7a59; }

#status { min-height: 1.2em; color: var(--hint); font-size: 13px; text-align: center; }
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: space-around;
  background: #fff; border-top: 1px solid var(--line); padding: 6px 6px calc(6px + var(--bottom));
}
#tabs button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--hint); min-width: 64px; min-height: 48px; justify-content: center; }
#tabs button[aria-current="page"] { color: var(--amber); font-weight: 700; }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + var(--bottom)); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 20; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
