/* ===== VOLVER — design tokens compartilhados =====

   DOIS FORMATOS, UM CÓDIGO
   - Desktop/notebook/tablet: o layout de sempre. As regras deste arquivo valem como estão.
   - Celular (navegador ou app instalado): <html data-device="mobile">, marcado no <head> de
     cada página (tools/aplicar-cabecalho-mobile.js) e, por garantia, em volver-app.js.
     Regra: tela de toque cujo lado menor tem menos de 600px. Tudo o que é só do celular
     fica em volver-mobile.css (camada mobile), carregado por todas as páginas, inclusive o
     index.html, que não usa este arquivo. Ali tudo fica sob :root[data-device="mobile"],
     então nada alcança o desktop.

   TOKENS
   - aqui: cores (--bg ... --calm, tema claro em :root[data-theme="light"]) e movimento
     (--ease-out, --ease-in-out, --ease-drawer)
   - em volver-mobile.css (documentados no topo de lá): breakpoints, espaços e margem lateral,
     áreas seguras, alturas da navegação, alvo de toque e tipografia de leitura */
:root{
  --bg: #12162A;
  --panel: #1B2140;
  --panel-line: #2C3459;
  --text: #E9E4D8;
  --text-dim: #A6A9BF;
  --text-faint: #6C7092;
  --gold: #D9A441;
  --worry: #A85C6B;
  --calm: #7C9A78;
  /* curvas de movimento: --ease-out já era usada em várias páginas (ebenezer, grupo, galeria...) e
     agora vale para todas; --ease-drawer é a curva de gaveta do iOS, usada na barra lateral */
  --ease-out: cubic-bezier(.2,.7,.2,1);
  --ease-in-out: cubic-bezier(.77,0,.175,1);
  --ease-drawer: cubic-bezier(.32,.72,0,1);
}
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
/* no celular: sem o clarão cinza ao tocar e sem o texto inflar quando o aparelho gira */
html{ -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust:100%; }
body{
  background: radial-gradient(ellipse 120% 80% at 50% -10%, #1A2044 0%, var(--bg) 55%);
  color: var(--text);
  font-family: 'Grenze', Georgia, serif;
  min-height:100vh; min-height:100svh;
  -webkit-font-smoothing:antialiased;
}
/* toque responde na hora (sem a espera do duplo toque) e segurar o dedo não seleciona o rótulo do botão */
button, [role="button"], .chip-btn, .toggle-btn, .continue-btn, .celebrate-btn{
  touch-action: manipulation; -webkit-user-select:none; user-select:none;
}
/* o iPhone dá zoom na página ao focar um campo com letra menor que 16px (login, Ebenézer, grupo...) */
@media (pointer: coarse){
  input, textarea, select{ font-size:16px !important; }
}
/* resposta ao toque: o botão afunda um pouco no instante em que é pressionado */
.continue-btn, .chip-btn, .toggle-btn, .settings-btn, .celebrate-btn, .card-act button, .card-fmt button,
.menu-btn, .theme-toggle, .fav-star-inline, .listen-btn-inline, .celebrate-icon-btn, .vc-share, .art-nav{
  transition-property: transform, border-color, color, background-color, box-shadow, opacity;
  transition-duration: .16s; transition-timing-function: var(--ease-out);
}
.continue-btn:active:not(:disabled):not(.vg-locked):not(.done), .chip-btn:active, .toggle-btn:active,
.settings-btn:active:not(:disabled), .celebrate-btn:active, .card-act button:active, .card-fmt button:active,
.menu-btn:active, .theme-toggle:active, .fav-star-inline:active, .listen-btn-inline:active,
.celebrate-icon-btn:active, .vc-share:active{ transform: scale(.97); }
.art-nav:active{ transform: translateY(-50%) scale(.94); }
a{ color: var(--gold); }

.stage-wrap{ width:100%; max-width:640px; margin:0 auto; padding: 0 20px 80px; }

/* ---- brand header ---- */
/* layout: back-button (and any middle elements) stay in natural order on the
   left; the wordmark is pushed to order:2 with an auto left-margin
   so the logo always ends up flush right, whatever else is in the bar. */
.brand-bar{ display:flex; align-items:center; gap:8px; padding: 26px 0 34px; }
.brand-word{ font-family:'Grenze Gotisch', Georgia, serif; font-weight:700; font-size:18px; text-decoration:none; color:var(--text); order:2; margin-left:auto; display:inline-flex; align-items:center; }
/* Wordmark: the "o" of Volver is a striped sun setting on the water. */
.vsun{ width:.74em; height:.74em; flex-shrink:0; margin:0 .01em 0 -.06em; position:relative; top:.11em; } /* desce o sol até a linha de base das letras, como um "o" */
.vsun path{ fill: var(--gold); }
.vword{ display:inline-flex; align-items:center; }
.brand-track{
  font-family:'Grenze', Georgia, serif; font-style:italic; font-size:13px;
  color: var(--text-faint); 
}

.eyebrow{
  font-family:'Grenze', Georgia, serif; font-style:italic; font-size:14.5px; 
  color: var(--gold); margin-bottom:10px;
}
h1{
  font-family:'Grenze Gotisch', Georgia, serif; font-weight:700; font-size:clamp(28px,6vw,40px);
  line-height:1.12; margin:0 0 10px;
}
.sub{ color:var(--text-dim); font-size:15px; line-height:1.55; max-width:52ch; margin:0 0 40px; }
.ref-tag{ font-family:'Grenze', Georgia, serif; font-size:12px; color: var(--text-faint); }

/* ================= TIMELINE (used by narrative/parable lessons) ================= */
.timeline{ position:relative; margin-bottom: 8px; }
.tl-item{ position:relative; padding-left:56px; padding-bottom: 6px; }
.tl-item:last-child .tl-line{ display:none; }

.tl-marker{
  position:absolute; left:0; top:0; width:38px; height:38px; border-radius:50%;
  background: var(--panel); border:1.5px solid var(--panel-line);
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  transition: background-color .25s ease, border-color .25s ease; z-index:2;
}
.tl-marker .icon path, .tl-marker .icon circle{ stroke: var(--text-dim); transition: stroke .3s ease; }
.tl-item.active .tl-marker{ background: var(--gold); border-color: var(--gold); }
.tl-item.active .tl-marker .icon path, .tl-item.active .tl-marker .icon circle{ stroke: var(--bg); }
.tl-item.done .tl-marker{ background: linear-gradient(rgba(217,164,65,0.14), rgba(217,164,65,0.14)), var(--bg); border-color: var(--gold); }
.tl-item.done .tl-marker .icon path, .tl-item.done .tl-marker .icon circle{ stroke: var(--gold); }
.tl-item.locked .tl-marker{ cursor:not-allowed; opacity:.5; }
.tl-marker:focus-visible{ outline: 2px solid var(--gold); outline-offset: 3px; }

.tl-line{ position:absolute; left:18px; top:38px; bottom:0; width:2px; background: var(--panel-line); }
.tl-item.done .tl-line{ background: var(--gold); }

.tl-head{ display:flex; align-items:center; height:38px; cursor:pointer; gap:10px; }
.tl-eyebrow{
  font-family:'Grenze', Georgia, serif; font-style:italic; font-size:12.5px; 
  color: var(--text-faint);
}
.tl-title-short{
  font-family:'Grenze Gotisch', Georgia, serif; font-weight:700; font-size:16px; color: var(--text-dim);
  transition: color .3s ease; margin-top:-4px; cursor:pointer;
}
.tl-item.active .tl-title-short, .tl-item.done .tl-title-short{ color: var(--text); }

.tl-body{ max-height:0; overflow:hidden; opacity:0; transition: max-height .35s var(--ease-out), opacity .25s ease, margin .35s var(--ease-out); }
.tl-item.active .tl-body{ max-height:1200px; opacity:1; margin: 14px 0 26px; }

.tl-card{ background: var(--panel); border:1px solid var(--panel-line); border-radius:14px; padding:20px 22px; }
.tl-card p{ font-size:14.5px; line-height:1.62; color:var(--text-dim); margin:0 0 14px; }
.tl-card p:last-child{ margin-bottom:0; }
.tl-card em{ color: var(--text); font-style:italic; }

.continue-btn{
  margin-top:16px; padding: 11px 20px; border-radius:9px;
  background: var(--gold); color: var(--bg); border:none;
  font-family:'Grenze', Georgia, serif; font-size:13.5px; font-weight:600; cursor:pointer;
}

.finish-row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.finish-row .continue-btn{ margin-top:16px; }
.inline-complete-icons{ display:flex; gap:6px; margin-top:16px; }
.inline-complete-back{ display:flex; margin:14px auto 0; }

/* ---- generic chip row sub-interaction ---- */
.chip-row{ display:flex; gap:9px; margin: 6px 0 14px; flex-wrap:wrap; }
.chip-btn{
  flex:1; min-width:90px; padding:12px 10px; border-radius:10px;
  border:1.5px solid var(--panel-line); background: var(--bg);
  color: var(--text-dim); font-size:12.5px; font-weight:500; cursor:pointer;
  text-align:center;
  font-family:'Grenze', Georgia, serif;
}
@media (hover: hover) and (pointer: fine){ .chip-btn:hover{ transform: translateY(-2px); } }
.chip-btn.chip-worry.active{ border-color: var(--worry); color: var(--worry); background: rgba(168,92,107,0.1); box-shadow: 0 0 0 3px rgba(168,92,107,0.12); transform: translateY(-1px); }
.chip-btn.chip-calm.active{ border-color: var(--calm); color: var(--calm); background: rgba(124,154,120,0.1); box-shadow: 0 0 0 3px rgba(124,154,120,0.12); transform: translateY(-1px); }
.chip-btn.chip-gold.active{ border-color: var(--gold); color: var(--gold); background: rgba(217,164,65,0.1); box-shadow: 0 0 0 3px rgba(217,164,65,0.12); transform: translateY(-1px); }
.chip-text{
  font-size:13.5px; line-height:1.6; color: var(--text-dim);
  padding-top:12px; margin-top:2px; border-top:1px dashed var(--panel-line); min-height:40px;
  animation: chip-text-in .22s var(--ease-out) both;
}
@keyframes chip-text-in{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:translateY(0); } }

/* ================= FINAL / DESFECHO ================= */
.verse-card{
  background: linear-gradient(155deg, rgba(217,164,65,0.09), rgba(124,154,120,0.06));
  border:1px solid rgba(217,164,65,0.35); border-radius:14px; padding:20px 22px; margin-bottom:18px;
}
.verse-card .tag{
  font-family:'Grenze', Georgia, serif; font-style:italic; font-size:13px; 
  color: var(--gold); display:block; margin-bottom:8px;
}
.verse-card p{ font-family:'Grenze', Georgia, serif; font-style:italic; font-size:17.5px; line-height:1.5; margin:0 0 8px; color:var(--text); }
.verse-card .ref{ font-family:'Grenze', Georgia, serif; font-size:12.5px; color:var(--text-dim); }

.toggle-row{ display:flex; gap:10px; margin: 18px 0 18px; }
.toggle-btn{
  flex:1; padding:13px 10px; border-radius:10px; border:1.5px solid var(--panel-line);
  background: var(--bg); color: var(--text-dim); font-size:13px; font-weight:500; cursor:pointer;
  font-family:'Grenze', Georgia, serif;
}
@media (hover: hover) and (pointer: fine){ .toggle-btn:hover{ transform: translateY(-2px); } }
.toggle-btn.active-worry{ border-color: var(--worry); color: var(--worry); background: rgba(168,92,107,0.1); box-shadow: 0 0 0 3px rgba(168,92,107,0.12); transform: translateY(-1px); }
.toggle-btn.active-calm{ border-color: var(--calm); color: var(--calm); background: rgba(124,154,120,0.1); box-shadow: 0 0 0 3px rgba(124,154,120,0.12); transform: translateY(-1px); }

.outcome{ border-radius:12px; padding:20px 20px 22px; border:1px solid var(--panel-line); background: var(--bg); overflow:hidden; }
.outcome-visual{ display:flex; align-items:center; justify-content:center; gap:8px; margin-bottom:16px; height:68px; }
.outcome h3{ font-family:'Grenze Gotisch', Georgia, serif; font-weight:700; font-size:16.5px; margin:0 0 8px; }
.outcome p{ font-size:13.5px; line-height:1.6; color:var(--text-dim); margin:0; }

.print-outcome-dual{ display:none; }

/* worry icon: a broken ring endlessly chasing itself */
.loop-dot{
  width:48px; height:48px; border-radius:50%; position:relative;
  border:3px solid rgba(168,92,107,0.22); border-top-color:var(--worry); border-right-color:var(--worry);
  animation: worry-spin 1.3s cubic-bezier(.5,0,.5,1) infinite;
  box-shadow: 0 0 0 6px rgba(168,92,107,0.07);
}
.loop-dot::after{
  content:""; position:absolute; top:-3px; right:6px; width:5px; height:5px; border-radius:50%;
  background: var(--worry); box-shadow: 0 0 6px 1px var(--worry);
}
@keyframes worry-spin{ to{ transform: rotate(360deg); } }

/* calm icon: a checkmark settling into a steady ring */
.anchor-line{
  width:48px; height:48px; border-radius:50%; position:relative;
  border:3px solid var(--calm); box-shadow: 0 0 0 6px rgba(124,154,120,0.1);
  animation: calm-settle .55s cubic-bezier(.34,1.56,.64,1) both;
}
.anchor-line::before, .anchor-line::after{
  content:""; position:absolute; background: var(--calm); border-radius:2px;
}
.anchor-line::before{ width:3px; height:11px; left:16px; top:24px; transform: rotate(45deg); }
.anchor-line::after{ width:3px; height:20px; left:25px; top:12px; transform: rotate(-45deg); }
@keyframes calm-settle{
  0%{ transform:scale(.85) rotate(-12deg); opacity:0; }
  60%{ transform:scale(1.04) rotate(2deg); opacity:1; }
  100%{ transform:scale(1) rotate(0); }
}

footer{ text-align:center; margin-top:36px; color: var(--text-faint); font-size:12.5px; font-family:'Grenze', Georgia, serif; }

/* movimento reduzido = mais suave, não zero: some tudo o que desloca, gira ou cresce,
   mas cor, borda e esmaecimento continuam (ajudam a entender o que mudou) */
@media (prefers-reduced-motion: reduce){
  .loop-dot{ animation: none; }
  .anchor-line{ animation: none; }
  *, *::before, *::after{ transition-property: opacity, color, background-color, border-color, box-shadow, fill, stroke !important; }
  .chip-btn:active, .toggle-btn:active, .continue-btn:active, .settings-btn:active, .celebrate-btn:active,
  .card-act button:active, .card-fmt button:active, .menu-btn:active, .theme-toggle:active,
  .fav-star-inline:active, .listen-btn-inline:active, .celebrate-icon-btn:active, .vc-share:active{ transform:none; }
  .art-nav:active{ transform: translateY(-50%); }
}

/* ================= RESPONSIVE (mobile / tablet) ================= */
/* Tablet and small desktop: a bit more breathing room, no structural change needed —
   .stage-wrap is already a centered, capped reading column at every width above this. */
@media (max-width: 720px){
  .stage-wrap{ padding: 0 18px 70px; }
}

/* Phones: the brand-bar's secondary label and side-by-side compare rows are the two
   things that don't gracefully reflow at ~375px and under, so they get explicit rules. */
@media (max-width: 520px){
  .stage-wrap{ padding: 0 16px 56px; }
  .brand-bar{ padding: 22px 0 28px; }
  .brand-track{ display:none; }

  .toggle-row, .split-row{ flex-direction:column; }
  .toggle-btn, .split-btn{ width:100%; }

  .chip-btn{ min-width:76px; font-size:12px; }

  .tl-item{ padding-left:48px; }
  .tl-marker{ width:34px; height:34px; }
  .tl-line{ left:16px; top:34px; }

  .verse-card, .tl-card, .outcome{ padding:16px 16px; }
}

/* Very small phones: tighten typography a notch further. */
@media (max-width: 360px){
  .sub{ font-size:14px; }
  .verse-card p{ font-size:15.5px; }
}

/* ===== VOLVER — plataforma: tema claro, favoritos, progresso, splash ===== */
:root[data-theme="light"]{
  --bg: #F4EFE1; --panel: #FFFFFF; --panel-line: #E1D8C2;
  --text: #2B2A24; --text-dim: #5B5748; --text-faint: #938C76;
  --gold: #AD7A22; --worry: #9C4C5B; --calm: #4F7548;
}
:root[data-theme="light"] body{
  background: radial-gradient(ellipse 120% 80% at 50% -10%, #FFFDF6 0%, var(--bg) 55%) !important;
}

:root[data-fontsize="0"] .wrap, :root[data-fontsize="0"] .stage-wrap{ zoom: 0.9; }
:root[data-fontsize="1"] .wrap, :root[data-fontsize="1"] .stage-wrap{ zoom: 0.95; }
:root[data-fontsize="3"] .wrap, :root[data-fontsize="3"] .stage-wrap{ zoom: 1.12; }
:root[data-fontsize="4"] .wrap, :root[data-fontsize="4"] .stage-wrap{ zoom: 1.25; }

.menu-btn{
  width:30px; height:30px; border-radius:9px; border:1px solid var(--panel-line);
  background: var(--panel); display:flex; align-items:center; justify-content:center;
  cursor:pointer; margin-right:10px; flex-shrink:0; padding:0;
}
@media (hover: hover){ .menu-btn:hover{ border-color: var(--gold); } }
.menu-btn svg{ width:15px; height:15px; }
.menu-btn path{ stroke: var(--text-dim); }

.sidebar-backdrop{
  position:fixed; inset:0; background: rgba(10,12,24,0.55); z-index:130;
  opacity:0; pointer-events:none; transition: opacity .2s ease;
}
.sidebar-backdrop.open{ opacity:1; pointer-events:auto; transition-duration:.3s; }

/* a gaveta abre na curva do iOS e fecha um pouco mais rápido do que abre */
.volver-sidebar{
  position:fixed; top:0; left:0; bottom:0; width:260px; max-width:82vw;
  background: var(--panel); border-right:1px solid var(--panel-line); z-index:140;
  display:flex; flex-direction:column; transform: translateX(-100%);
  transition: transform .24s var(--ease-drawer); overflow-y:auto; overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.volver-sidebar.open{ transform: translateX(0); transition-duration:.32s; }

.sidebar-head{ display:flex; align-items:center; justify-content:space-between; padding:20px 18px; border-bottom:1px solid var(--panel-line); }
.sidebar-brand{ display:flex; align-items:center; gap:8px; font-family:'Grenze Gotisch', Georgia, serif; font-weight:700; font-size:15px; color:var(--text); text-decoration:none; }
.sidebar-brand .vword{ font-size:17px; }
.sidebar-close{ background:none; border:none; color: var(--text-faint); font-size:22px; cursor:pointer; line-height:1; padding:0; }
@media (hover: hover){ .sidebar-close:hover{ color: var(--gold); } }

.sidebar-nav{ padding:14px 10px; display:flex; flex-direction:column; gap:2px; flex:1; }
.sidebar-link{
  display:block; padding:10px 12px; border-radius:8px; font-size:13.5px; color: var(--text-dim);
  font-family:'Grenze', Georgia, serif; text-decoration:none; transition: background .2s ease, color .2s ease;
}
@media (hover: hover){ .sidebar-link:hover{ background: rgba(217,164,65,0.08); color: var(--text); } }

.sidebar-toggle{
  display:flex; align-items:center; justify-content:space-between; width:100%;
  padding:10px 12px; border-radius:8px; font-size:13.5px; color: var(--text-dim);
  font-family:'Grenze', Georgia, serif; background:none; border:none; cursor:pointer;
  text-align:left; transition: background .2s ease, color .2s ease;
}
@media (hover: hover){ .sidebar-toggle:hover{ background: rgba(217,164,65,0.08); color: var(--text); } }
.sidebar-toggle .chev{ width:9px; height:9px; flex-shrink:0; transition: transform .2s ease; }
.sidebar-toggle .chev path{ stroke: var(--text-faint); }
.sidebar-toggle.open .chev{ transform: rotate(90deg); }

.sidebar-lessons{ max-height:0; overflow:hidden; transition: max-height .25s var(--ease-out); }
.sidebar-lessons.open{ max-height:400px; }
.sidebar-sublink{
  display:block; padding:8px 12px 8px 24px; border-radius:8px; font-size:13px; color: var(--text-faint);
  font-family:'Grenze', Georgia, serif; text-decoration:none; transition: background .2s ease, color .2s ease;
}
@media (hover: hover){ .sidebar-sublink:hover{ background: rgba(217,164,65,0.08); color: var(--text); } }

.sidebar-foot{ padding:14px 18px; border-top:1px solid var(--panel-line); display:flex; align-items:center; gap:10px; }
.sidebar-foot .theme-toggle{ margin:0; }
.sidebar-foot span{ font-family:'Grenze', Georgia, serif; font-size:11.5px; color:var(--text-faint); }
/* Shared pill buttons (Configurações actions + sidebar sign-out) */
.settings-btn{
  flex-shrink:0; padding:10px 18px; border-radius:9px; border:1px solid var(--panel-line);
  background: var(--bg); color: var(--text); font-family:'Grenze', Georgia, serif;
  font-size:13px; font-weight:600; cursor:pointer; white-space:nowrap;
}
@media (hover: hover){ .settings-btn:hover{ border-color: var(--gold); } }
.settings-btn:disabled{ opacity:.45; cursor:not-allowed; }
.settings-btn.danger{ color: var(--worry); border-color: rgba(168,92,107,0.4); }
@media (hover: hover){ .settings-btn.danger:hover{ border-color: var(--worry); } }

.sidebar-foot .signout-btn{ margin-left:auto; }
.sidebar-icon{ display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; border-radius:10px; border:1px solid var(--panel-line); color: var(--text-dim); transition: border-color .2s ease, color .2s ease; }
.sidebar-icon svg{ width:18px; height:18px; stroke: currentColor; }
.sidebar-icon:focus-visible{ border-color: var(--gold); color: var(--text); outline:none; } @media (hover: hover){ .sidebar-icon:hover{ border-color: var(--gold); color: var(--text); outline:none; } }
.sidebar-streak{
  display:flex; align-items:center; gap:5px;
  font-family:'Grenze', Georgia, serif; font-size:12.5px; font-weight:600; color: var(--gold);
}
.sidebar-streak svg{ width:14px; height:14px; }
.sidebar-streak path{ stroke: var(--gold); }
.sidebar-streak.at-risk, .sidebar-streak.at-risk path{ color: var(--worry); stroke: var(--worry); }

@media (max-width:520px){
  .volver-sidebar{ width:82vw; }
}

/* Até ~400px, Voltar + Favoritar + Ouvir + logo não cabem na barra: aperta os botões
   para o logo não ser cortado nem a página rolar de lado. */
@media (max-width: 400px){
  .brand-bar .back-btn{ margin-right:2px; }
  .brand-bar .fav-star-inline, .brand-bar .listen-btn-inline{ margin-left:4px; padding:6px 9px; }
  .brand-bar .brand-word{ flex-shrink:0; }
}

.back-btn{
  display:inline-flex; align-items:center; gap:5px; margin-right:8px;
  font-family:'Grenze', Georgia, serif; font-size:12px; color: var(--text-faint);
  cursor:pointer; transition: color .2s ease; background:none; border:none; padding:0;
}
@media (hover: hover){ .back-btn:hover{ color: var(--gold); } }
.back-btn svg{ width:12px; height:12px; }
.back-btn path{ stroke: currentColor; }

.theme-toggle{
  width:30px; height:30px; border-radius:50%; border:1px solid var(--panel-line);
  background: var(--panel); display:flex; align-items:center; justify-content:center;
  cursor:pointer; margin-left:10px; flex-shrink:0; padding:0;
}
@media (hover: hover){ .theme-toggle:hover{ border-color: var(--gold); } }
.theme-toggle svg{ width:15px; height:15px; }
.theme-toggle path, .theme-toggle circle{ stroke: var(--text-dim); }
.theme-toggle .icon-sun{ display:none; }
:root[data-theme="light"] .theme-toggle .icon-moon{ display:none; }
:root[data-theme="light"] .theme-toggle .icon-sun{ display:block; }

.fav-star-inline{
  display:inline-flex; align-items:center; gap:6px; margin-left:10px;
  border:1px solid var(--panel-line); border-radius:20px; padding:6px 12px; background:none;
  font-family:'Grenze', Georgia, serif; font-size:11.5px; color: var(--text-dim); cursor:pointer;
}
.fav-star-inline svg{ width:13px; height:13px; }
.fav-star-inline path{ stroke: var(--text-faint); fill:none; transition: stroke .2s ease, fill .2s ease; }
.fav-star-inline.active{ border-color: var(--gold); color: var(--gold); }
.fav-star-inline.active path{ stroke: var(--gold); fill: var(--gold); }

.listen-btn-inline{
  display:inline-flex; align-items:center; gap:6px; margin-left:10px;
  border:1px solid var(--panel-line); border-radius:20px; padding:6px 12px; background:none;
  font-family:'Grenze', Georgia, serif; font-size:11.5px; color: var(--text-dim); cursor:pointer;
}
.listen-btn-inline svg{ width:13px; height:13px; }
.listen-btn-inline path, .listen-btn-inline rect{ stroke: var(--text-faint); fill:none; transition: stroke .2s ease; }
.listen-btn-inline.active{ border-color: var(--gold); color: var(--gold); }
.listen-btn-inline.active path, .listen-btn-inline.active rect{ stroke: var(--gold); }

.fav-star-card{
  position:absolute; border:none; cursor:pointer; z-index:3;
  width:24px; height:24px; border-radius:50%;
  background: rgba(18,22,42,0.55); backdrop-filter: blur(2px);
  display:flex; align-items:center; justify-content:center; padding:0;
}
.fav-star-card svg{ width:12px; height:12px; }
.fav-star-card path{ stroke: rgba(233,228,216,0.7); fill:none; transition: stroke .2s ease, fill .2s ease; }
.fav-star-card.active path{ stroke: var(--gold); fill: var(--gold); }
.show-thumb .fav-star-card{ top:6px; right:6px; }
.p-card .fav-star-card{
  position:static; display:inline-flex; width:18px; height:18px; margin-left:8px;
  vertical-align:middle; background: var(--panel-line);
}
.p-card .fav-star-card svg{ width:10px; height:10px; }
.p-card .fav-star-card path{ stroke: var(--text-faint); }

.completed-badge{
  position:absolute; top:6px; left:6px; width:20px; height:20px; border-radius:50%;
  background: rgba(124,154,120,0.85); display:flex; align-items:center; justify-content:center; z-index:3;
}
.completed-badge svg{ width:10px; height:10px; }

.progress-badge{
  position:absolute; top:6px; left:6px; width:20px; height:20px; border-radius:50%;
  background: rgba(217,164,65,0.85); display:flex; align-items:center; justify-content:center; z-index:3;
}
.progress-badge svg{ width:10px; height:10px; }

.completed-tag{
  display:inline-block; font-family:'Grenze', Georgia, serif; font-style:italic; font-size:12px;
  color: var(--calm); margin-left:8px;
}
.progress-tag{
  display:inline-block; font-family:'Grenze', Georgia, serif; font-style:italic; font-size:12px;
  color: var(--gold); margin-left:8px;
}

.continue-btn.done{ background: var(--calm); cursor:default; opacity:.9; }

.methodology-banner{
  display:flex; align-items:center; gap:12px; margin:22px 0 6px;
  padding:14px 18px; border-radius:12px; background: rgba(217,164,65,0.08);
  border:1px solid rgba(217,164,65,0.3);
}
.methodology-banner svg{ width:20px; height:20px; flex-shrink:0; }
.methodology-banner path, .methodology-banner circle{ stroke: var(--gold); }
.methodology-banner p{ margin:0; font-size:12.5px; line-height:1.5; color: var(--text-dim); flex:1; }
.methodology-banner strong{ color: var(--text); }
.methodology-banner a{
  flex-shrink:0; font-family:'Grenze', Georgia, serif; font-size:12px; font-weight:600;
  color: var(--gold); text-decoration:none; white-space:nowrap;
}
@media (hover: hover){ .methodology-banner a:hover{ text-decoration:underline; } }
@media (max-width:520px){
  .methodology-banner{ flex-direction:column; align-items:flex-start; }
}


/* ---- intro splash: "espelho d'água" ----
   (~3.6s) A linha do horizonte se abre, o sol nasce da água no lugar do "o" e acende,
   as letras surgem do desfoque a partir dele, e na água o reflexo ondula: um caminho de
   luz sob o sol e anéis que se abrem na superfície. */
.intro-splash{
  position:fixed; inset:0; z-index:9999; background: var(--bg); overflow:hidden;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  transition: opacity .8s ease;
}
.intro-splash::before{ /* a claridade da manhã no horizonte */
  content:""; position:absolute; left:50%; top:50%; width:150vmax; height:60vmax; transform:translate(-50%,-50%); pointer-events:none;
  background: radial-gradient(ellipse at center, rgba(217,164,65,.17), rgba(217,164,65,.06) 28%, transparent 58%);
  opacity:0; animation: intro-dawn 3s ease-out .9s forwards;
}
.intro-splash.fade-out{ opacity:0; pointer-events:none; }
.intro-mirror{ position:relative; display:flex; flex-direction:column; align-items:center; transition: transform .8s cubic-bezier(.4,0,.2,1), filter .8s ease; }
.intro-splash.fade-out .intro-mirror{ transform:scale(1.035); filter:blur(3px); }
.intro-word{
  font-family:'Grenze Gotisch', Georgia, serif; font-weight:700; font-size:clamp(52px, 13vw, 88px); line-height:1; letter-spacing:.012em;
  color: var(--text); display:flex; align-items:center; padding-top:.9em;
  clip-path: inset(0 -60% 0 -60%); /* a borda de baixo é a linha d'água */
}
.intro-word .il{ display:inline-block; animation: intro-letter 1.15s cubic-bezier(.2,.7,.2,1) both; }
.intro-word .il-1, .intro-word .il-2{ animation-delay:2.05s; }
.intro-word .il-3{ animation-delay:2.15s; }
.intro-word .il-4{ animation-delay:2.25s; }
.intro-word .il-5{ animation-delay:2.35s; }
.intro-word .iw-sun{ position:relative; display:inline-flex; }
.intro-word .vsun{ animation: intro-sunrise 2s cubic-bezier(.3,.55,.15,1) .55s both, intro-sunglow 2.4s ease-out 1.6s both; }
.intro-horizon{
  width:min(84vw, 520px); height:1px; position:relative; z-index:1;
  background: linear-gradient(90deg, transparent, var(--gold) 22%, #F0C86E 50%, var(--gold) 78%, transparent);
  box-shadow: 0 0 14px rgba(217,164,65,.45);
  transform-origin:center; animation: intro-horizon 4s cubic-bezier(.2,.7,.2,1) both;
}
/* o reflexo: a mesma palavra espelhada, ondulando e sumindo na água */
.intro-refl{
  transform:scaleY(-1); opacity:.42; filter:url(#volverRipple);
  -webkit-mask-image: linear-gradient(to top, #000 0, rgba(0,0,0,.55) 35%, transparent 85%);
  mask-image: linear-gradient(to top, #000 0, rgba(0,0,0,.55) 35%, transparent 85%);
}
.intro-refl .glint{ /* caminho de luz do sol na água */
  position:absolute; left:50%; bottom:.05em; width:1.6em; height:1.35em; transform:translateX(-50%);
  display:flex; flex-direction:column-reverse; justify-content:space-between; opacity:0;
  animation: intro-fade 1.6s ease-out 1.4s forwards;
}
.intro-refl .glint b{
  display:block; height:.05em; min-height:1px; margin:0 auto; border-radius:2px;
  background: linear-gradient(90deg, transparent, #F0C86E, transparent);
  animation: intro-glint 2.2s ease-in-out infinite alternate;
}
.intro-refl .glint b:nth-child(1){ width:92%; }
.intro-refl .glint b:nth-child(2){ width:74%; animation-delay:-.6s; }
.intro-refl .glint b:nth-child(3){ width:86%; animation-delay:-1.3s; }
.intro-refl .glint b:nth-child(4){ width:58%; animation-delay:-.3s; }
.intro-refl .glint b:nth-child(5){ width:68%; animation-delay:-1.8s; }
.intro-refl .glint b:nth-child(6){ width:44%; animation-delay:-.9s; }
.intro-refl .glint b:nth-child(7){ width:52%; animation-delay:-1.5s; }
.intro-refl .glint b:nth-child(8){ width:30%; animation-delay:-.4s; }
.intro-refl .glint b:nth-child(9){ width:22%; animation-delay:-1.1s; }
@keyframes intro-dawn{ to{ opacity:1; } }
@keyframes intro-fade{ to{ opacity:1; } }
@keyframes intro-sunrise{ from{ transform:translateY(118%); } to{ transform:none; } }
@keyframes intro-sunglow{ from{ filter: drop-shadow(0 0 0 rgba(240,200,110,0)); } to{ filter: drop-shadow(0 0 .14em rgba(240,200,110,.55)); } }
@keyframes intro-letter{ from{ opacity:0; transform:translateY(.22em); filter:blur(8px); } to{ opacity:1; transform:none; filter:blur(0); } }
@keyframes intro-horizon{ 0%{ transform:scaleX(0); opacity:1; } 30%{ transform:scaleX(1); opacity:1; } 70%{ opacity:.85; } 100%{ transform:scaleX(1); opacity:.4; } }
@keyframes intro-glint{ from{ opacity:.25; transform:scaleX(.55); } to{ opacity:1; transform:scaleX(1); } }
@media (prefers-reduced-motion: reduce){
  .intro-splash::before, .intro-word .il, .intro-word .vsun, .intro-horizon, .intro-refl .glint, .intro-refl .glint b{ animation:none; }
  .intro-splash::before, .intro-refl .glint{ opacity:1; }
  .intro-horizon{ opacity:.4; }
  .intro-refl{ filter:none; }
  .intro-splash, .intro-mirror{ transition:none; }
}

/* ---- lesson completion celebration ---- */
.celebrate-backdrop{
  position:fixed; inset:0; z-index:500; background: rgba(10,12,24,0.72);
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none; transition: opacity .2s ease; padding:20px;
}
.celebrate-backdrop.open{ opacity:1; pointer-events:auto; transition-duration:.3s; }

.celebrate-burst{
  position:absolute; top:-134px; left:50%; transform:translateX(-50%);
  width:160px; height:150px; pointer-events:none;
}
.celebrate-ring{
  position:absolute; top:50%; left:50%; width:80px; height:80px; margin:-40px 0 0 -40px;
  border-radius:50%; border:2px solid var(--gold); opacity:0;
  animation: celebrate-ring-out 1s ease-out forwards;
}
.celebrate-ring.r2{ animation-delay:.15s; border-color: var(--calm); }
@keyframes celebrate-ring-out{
  0%{ transform:scale(.3); opacity:.8; }
  100%{ transform:scale(1.6); opacity:0; }
}
.celebrate-check{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%) scale(.5); opacity:0;
  width:56px; height:56px; border-radius:50%; background: var(--calm);
  display:flex; align-items:center; justify-content:center;
  animation: celebrate-check-pop .5s cubic-bezier(.34,1.56,.64,1) .2s forwards;
}
.celebrate-check svg{ width:26px; height:26px; }
@keyframes celebrate-check-pop{ to{ transform:translate(-50%,-50%) scale(1); opacity:1; } }
.confetti-piece{
  position:absolute; top:50%; left:50%; width:7px; height:10px; border-radius:1px;
  opacity:0; animation: confetti-fall 1.1s ease-out forwards;
}
@keyframes confetti-fall{
  0%{ transform:translate(-50%,-50%) rotate(0deg); opacity:1; }
  100%{ transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) rotate(var(--rot)); opacity:0; }
}

.celebrate-modal{
  background: var(--panel); border:1px solid var(--panel-line); border-radius:18px;
  padding:28px 26px; max-width:340px; width:88vw; text-align:center;
  opacity:0; transform:translateY(10px); animation: celebrate-modal-in .4s var(--ease-out) .3s forwards;
  position:relative;
}
@keyframes celebrate-modal-in{ to{ opacity:1; transform:translateY(0); } }
.celebrate-close{
  position:absolute; top:12px; right:14px; background:none; border:none;
  color: var(--text-faint); font-size:20px; cursor:pointer; line-height:1; padding:0;
}
@media (hover: hover){ .celebrate-close:hover{ color: var(--gold); } }

.celebrate-head{ display:flex; align-items:center; justify-content:center; gap:10px; margin-bottom:6px; }
.celebrate-title{ font-family:'Grenze Gotisch', Georgia, serif; font-weight:700; font-size:19px; }
.celebrate-icons{ display:flex; gap:6px; }
.celebrate-icon-btn{
  width:30px; height:30px; border-radius:50%; border:1px solid var(--panel-line);
  background: var(--bg); display:flex; align-items:center; justify-content:center;
  cursor:pointer; flex-shrink:0; padding:0;
}
@media (hover: hover){ .celebrate-icon-btn:hover{ border-color: var(--gold); } }
.celebrate-icon-btn svg{ width:14px; height:14px; }
.celebrate-icon-btn path{ stroke: var(--text-dim); transition: stroke .2s ease; }
@media (hover: hover){ .celebrate-icon-btn:hover path{ stroke: var(--gold); } }

.celebrate-sub{ font-family:'Grenze', Georgia, serif; font-size:12px; color: var(--text-faint); margin-bottom:22px; }
.celebrate-streak{
  display:flex; align-items:center; justify-content:center; gap:8px; flex-wrap:wrap;
  background: rgba(217,164,65,0.1); border:1px solid rgba(217,164,65,0.3); border-radius:11px;
  padding:9px 14px; margin:-8px 0 20px; font-size:12.5px; color: var(--text-dim);
}
.celebrate-streak svg{ width:15px; height:15px; flex-shrink:0; }
.celebrate-streak path{ stroke: var(--gold); }
.celebrate-streak span{ color: var(--text); font-weight:600; }
.celebrate-streak-tag{
  width:100%; font-family:'Grenze', Georgia, serif; font-style:italic; font-size:12.5px; 
  color: var(--gold);
}
.celebrate-streak.milestone{ border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,164,65,0.12); }
.celebrate-artwork{
  margin: -6px 0 20px; padding:16px 14px 14px; border-radius:14px;
  background: rgba(217,164,65,0.08); border:1px solid rgba(217,164,65,0.28);
}
.celebrate-artwork-label{
  font-family:'Grenze', Georgia, serif; font-style:italic; font-size:12px; 
  color: var(--gold); margin-bottom:10px;
}
.celebrate-artwork-grid{ display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin-bottom:10px; }
.celebrate-artwork-frame{
  width:76px; aspect-ratio: 4 / 5;
  border-style:solid; border-width:7px;
  border-image-source:url('assets/moldura-madeira.svg');
  border-image-slice:20%; border-image-repeat:stretch;
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
  opacity:0; transform:scale(.75); filter:blur(6px) brightness(2.2);
  animation: artwork-unlock .9s cubic-bezier(.2,.7,.3,1) forwards;
}
.celebrate-artwork-frame img{ width:100%; height:100%; object-fit:cover; display:block; }
@keyframes artwork-unlock{
  0%{ opacity:0; transform:scale(.75); filter:blur(6px) brightness(2.4); }
  60%{ opacity:1; transform:scale(1.04); filter:blur(0) brightness(1.5); }
  100%{ opacity:1; transform:scale(1); filter:blur(0) brightness(1); }
}
.celebrate-artwork-title{ font-family:'Grenze Gotisch', Georgia, serif; font-weight:700; font-size:13.5px; margin-bottom:2px; }
.celebrate-artwork-book{ font-family:'Grenze', Georgia, serif; font-size:11px; color: var(--text-faint); margin-bottom:10px; }
.celebrate-artwork-link{
  font-family:'Grenze', Georgia, serif; font-size:11.5px; color: var(--gold); text-decoration:none;
  border-bottom:1px solid transparent;
}
@media (hover: hover){ .celebrate-artwork-link:hover{ border-bottom-color: var(--gold); } }
.celebrate-btn{
  padding:11px 16px; border-radius:10px; border:1px solid var(--panel-line);
  background: var(--bg); color: var(--text); font-family:'Grenze', Georgia, serif;
  font-size:13.5px; font-weight:600; cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:8px; text-decoration:none;
}
@media (hover: hover){ .celebrate-btn:hover{ border-color: var(--gold); } }
.celebrate-btn.primary{ background: var(--gold); color: var(--bg); border-color: var(--gold); }
@media (hover: hover){ .celebrate-btn.primary:hover{ opacity:.9; } }
.celebrate-back{ margin:0 auto; }
@media (prefers-reduced-motion: reduce){
  .celebrate-ring, .confetti-piece, .celebrate-check, .celebrate-modal, .celebrate-artwork-frame{ animation:none; opacity:1; transform:none; filter:none; }
}

/* ---- art carousel: public-domain engravings at the top of a hub page, framed like museum pieces ---- */
.art-carousel{ margin: 8px 0 6px; }
.art-gallery-title{
  display:flex; align-items:center; justify-content:center; gap:14px; margin:0 0 18px;
  font-family:'Grenze', Georgia, serif; font-weight:500; font-style:italic;
  font-size:17px; letter-spacing:.04em; color: var(--gold); text-align:center;
}
.art-gallery-title::before, .art-gallery-title::after{
  content:""; flex:1 1 auto; max-width:70px; height:1px; background: var(--panel-line);
}
.art-unlock-note{
  font-family:'Grenze', Georgia, serif; font-size:11.5px; line-height:1.55; color: var(--text-faint);
  text-align:center; margin:-8px auto 16px; max-width:52ch;
}
/* obra ainda bloqueada no carrossel (volver-app.js lockSlide): moldura com cadeado, como na galeria de artes */
/* até o volver-app.js decidir o que está bloqueado (milissegundos), nenhuma pintura aparece; se o script falhar, elas surgem após 3 s */
.art-carousel:not(.art-ready) .art-mat img{ visibility:hidden; animation: artFallback 0s linear 3s forwards; }
@keyframes artFallback{ to{ visibility:visible; } }
/* obra coberta (bloqueada): o mesmo pano do museu (galeria-de-artes.html), no carrossel dos livros e nas salas */
.veil{ position:absolute; inset:0; z-index:3; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; text-align:center; padding:18px;
  background: repeating-linear-gradient(92deg, rgba(255,255,255,.035) 0 2px, transparent 2px 9px), linear-gradient(180deg, #3b2a4a, #22182e 60%, #1a1324);
  border-radius:2px; box-shadow: inset 0 -18px 30px rgba(0,0,0,.45), inset 0 8px 14px rgba(255,255,255,.05); }
.veil::before{ /* dobras do pano */
  content:""; position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(100deg, transparent 8%, rgba(0,0,0,.25) 14%, transparent 22%, transparent 46%, rgba(0,0,0,.22) 52%, transparent 60%, transparent 78%, rgba(0,0,0,.2) 85%, transparent 92%); }
.veil svg{ width:30px; height:30px; position:relative; }
.veil svg path, .veil svg rect{ stroke: rgba(246,220,149,.75); }
.veil .vl{ position:relative; font-family:'Grenze', Georgia, serif; font-style:italic; font-size:12px; color: rgba(246,220,149,.8); }
/* no carrossel o pano fica no fluxo da moldura (sem camada própria): ao arrastar, um .veil absoluto com z-index
   ganhava camada à parte no Chrome e descolava da moldura, mostrando o passe-partout claro atrás */
.art-mat.locked-mat{ padding:0; background:#1a1324; transform:translateZ(0); }
.art-mat.locked-mat .veil{ position:relative; inset:auto; z-index:auto; width:100%; height:100%; box-sizing:border-box; }
.art-slide.locked .art-credit a{ color: var(--gold); text-decoration:none; border-bottom:1px solid transparent; }
@media (hover: hover){ .art-slide.locked .art-credit a:hover{ border-bottom-color: var(--gold); } }
/* ligação com o museu: obra revelada abre na galeria; link para a sala do livro */
.art-frame.to-museum{ cursor: zoom-in; }
.art-frame.to-museum:focus-visible{ outline:2px solid var(--gold); outline-offset:6px; }
.art-museum-link{ display:table; margin:-8px auto 18px; font-family:'Grenze', Georgia, serif; font-size:12px; color: var(--gold); text-decoration:none; border-bottom:1px solid rgba(217,164,65,.35); }
@media (hover: hover){ .art-museum-link:hover{ border-bottom-color: var(--gold); } }
a.celebrate-artwork-frame{ display:block; cursor: zoom-in; }
.art-viewport{ position:relative; }
.art-track{
  display:flex; align-items:flex-start; gap:22px; overflow-x:auto; scroll-snap-type:x mandatory;
  padding: 6px 4px 6px; margin: 0 -4px; scrollbar-width:none;
}
.art-track::-webkit-scrollbar{ display:none; }
.art-slide{
  display:flex; flex-direction:column; gap:9px;
  flex:0 0 auto; scroll-snap-align:center; width:min(78vw,300px);
}

/* the frame: a thin, plain light-wood strip (subtle SVG grain, no carving) — minimal modern print framing */
.art-frame{ position:relative; aspect-ratio: 4 / 5; }
.art-mat{
  position:absolute; inset:14px; overflow:hidden; border-radius:1px; box-sizing:border-box;
  background:#efe6cd; padding:16px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15), inset 0 1px 4px rgba(0,0,0,0.2);
}
.art-mat img{
  width:100%; height:100%; object-fit:cover; display:block;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.5);
}
.art-frame-border{
  position:absolute; inset:0; pointer-events:none; box-sizing:border-box;
  border-style:solid; border-width:14px;
  border-image-source:url('assets/moldura-madeira.svg');
  border-image-slice:20%;
  border-image-repeat:stretch;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}
.art-credit{
  font-family:'Grenze', Georgia, serif; font-size:10.5px; line-height:1.45; 
  color: var(--text-faint); text-align:center; padding:0 2px;
}
.art-nav{
  position:absolute; top:44%; transform:translateY(-50%); z-index:2;
  width:34px; height:34px; border-radius:50%; border:1px solid var(--panel-line);
  background: rgba(18,22,42,0.75); backdrop-filter: blur(2px); color: var(--text);
  font-size:17px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center;
}
@media (hover: hover){ .art-nav:hover{ border-color: var(--gold); } }
.art-nav.prev{ left:-6px; }
.art-nav.next{ right:-6px; }
@media (max-width:560px){ .art-nav{ display:none; } }

/* ---- print / "baixar como PDF" via browser print dialog ---- */
@media print{
  @page{ margin: 16mm 15mm; }

  :root{
    --bg:#FDFBF3; --panel:#FFFFFF; --panel-line:#E1D8C2;
    --text:#241F16; --text-dim:#5B5748; --text-faint:#8C8468;
    --gold:#AD7A22; --worry:#9C4C5B; --calm:#4F7548;
  }
  *{
    -webkit-print-color-adjust:exact; print-color-adjust:exact;
    animation:none !important; transition:none !important;
  }

  html, body{ background:#FDFBF3 !important; }
  body{ color: var(--text) !important; }

  .volver-sidebar, .sidebar-backdrop, .menu-btn, .back-btn, .theme-toggle,
  .fav-star-inline, .fav-star-card, .listen-btn-inline, .finish-row, .inline-complete-back, .celebrate-backdrop,
  .intro-splash, .chip-row, .art-carousel, footer{ display:none !important; }

  .brand-bar{ border-bottom:1.5px solid var(--panel-line); padding-bottom:16px; margin-bottom:26px; }
  .brand-word{ color: var(--text) !important; }
  .brand-track{ color: var(--text-faint) !important; }

  h1, .eyebrow, .sub, .ref-tag{ color: var(--text) !important; }
  .eyebrow{ color: var(--gold) !important; }

  .tl-marker{ display:none !important; }
  .tl-line{ display:none !important; }
  .tl-item{ padding-left:0 !important; break-inside:avoid; page-break-inside:avoid; }
  .tl-head{ height:auto !important; }
  .tl-eyebrow{ color: var(--gold) !important; }
  .tl-title-short{ color: var(--text) !important; font-size:18px !important; margin-top:0 !important; }
  .tl-body{ max-height:none !important; opacity:1 !important; overflow:visible !important; margin:10px 0 28px !important; }

  .tl-card{ background: var(--panel) !important; border:1px solid var(--panel-line) !important; box-shadow:none !important; }
  .tl-card p{ color: var(--text-dim) !important; }
  .tl-card em{ color: var(--text) !important; }

  .verse-card{
    background: rgba(173,122,34,0.07) !important; border:1px solid rgba(173,122,34,0.5) !important;
    break-inside:avoid; page-break-inside:avoid;
  }
  .verse-card .tag{ color: var(--gold) !important; }
  .verse-card p{ color: var(--text) !important; }
  .verse-card .ref{ color: var(--text-dim) !important; }

  .toggle-row{ break-inside:avoid; page-break-inside:avoid; }
  .toggle-btn{ background: var(--panel) !important; border-color: var(--panel-line) !important; color: var(--text-dim) !important; }
  .toggle-btn.active-worry{ border-color: var(--worry) !important; color: var(--worry) !important; background: rgba(156,76,91,0.08) !important; }
  .toggle-btn.active-calm{ border-color: var(--calm) !important; color: var(--calm) !important; background: rgba(79,117,72,0.08) !important; }

  .outcome{ display:none !important; }

  .print-outcome-dual{
    display:grid !important; grid-template-columns:1fr 1fr; gap:12px; margin-top:4px;
    break-inside:avoid; page-break-inside:avoid;
  }
  .print-outcome-block{ border-radius:12px; padding:16px 18px; border:1px solid; }
  .print-outcome-block.worry{ border-color: var(--worry) !important; background: rgba(156,76,91,0.08) !important; }
  .print-outcome-block.calm{ border-color: var(--calm) !important; background: rgba(79,117,72,0.08) !important; }
  .poc-tag{
    display:block; font-family:'Grenze', Georgia, serif; font-style:italic; font-size:11.5px; 
    margin-bottom:6px; font-weight:600;
  }
  .print-outcome-block.worry .poc-tag{ color: var(--worry) !important; }
  .print-outcome-block.calm .poc-tag{ color: var(--calm) !important; }
  .print-outcome-block h3{ font-family:'Grenze Gotisch', Georgia, serif; font-weight:700; font-size:14px; margin:0 0 6px; color: var(--text) !important; }
  .print-outcome-block p{ font-size:11.5px; line-height:1.5; margin:0; color: var(--text-dim) !important; }

  a{ color: var(--gold) !important; text-decoration:none !important; }
}

/* ---- re-consent when the terms change (volver-app.js showTermsConsent) ---- */
.terms-consent{ z-index:900; overflow-y:auto; align-items:flex-start; }
.terms-consent-modal{ max-width:460px; width:100%; text-align:left; margin:auto; animation-delay:0s; font-size:14px; line-height:1.55; color:var(--text); }
.terms-consent-title{ font-family:'Grenze Gotisch', Georgia, serif; font-weight:700; font-size:21px; margin:0 0 10px; }
.terms-consent-modal p{ margin:0 0 12px; color:var(--text-dim); }
.terms-consent-modal a{ color:var(--gold); }
.terms-consent-label{ font-family:'Grenze', Georgia, serif; font-style:italic; font-size:13px; color:var(--gold); margin:4px 0 6px; }
.terms-consent-modal ul{ margin:0 0 12px; padding-left:18px; color:var(--text); }
.terms-consent-modal li{ margin-bottom:6px; }
.terms-consent-check{ display:flex; gap:10px; align-items:flex-start; padding:12px; border:1px solid var(--panel-line); border-radius:10px; background:var(--bg); cursor:pointer; margin-bottom:8px; }
.terms-consent-check input{ margin-top:3px; flex:0 0 auto; accent-color:var(--gold); width:16px; height:16px; }
.terms-consent-error{ color:var(--worry) !important; font-size:13px; min-height:1px; margin:0 0 8px !important; }
.terms-consent-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.terms-consent-accept{ background:var(--gold); color:#12162A; border-color:var(--gold); }
.terms-consent-accept:disabled{ opacity:.45; cursor:not-allowed; }
.terms-consent-foot{ font-size:12.5px; color:var(--text-faint) !important; margin:0 !important; }

/* ---- Volver Premium: cadeado nas reflexões pagas (volver-app.js → applyPaywall) ---- */
.volver-paywall{
  margin-top:28px; padding:28px 24px; text-align:center;
  background: var(--panel); border:1px solid var(--gold); border-radius:16px;
}
.volver-paywall-badge{
  display:inline-block; font-family:'Grenze', Georgia, serif; font-style:italic; font-size:12.5px; 
  color: var(--gold); border:1px solid rgba(217,164,65,.5); border-radius:20px; padding:4px 12px;
}
.volver-paywall h2{ font-family:'Grenze Gotisch', Georgia, serif; font-weight:700; font-size:21px; margin:16px 0 8px; }
.volver-paywall p{ color: var(--text-dim); font-size:14px; line-height:1.6; margin:0 auto 18px; max-width:42ch; }
.volver-paywall .continue-btn{ display:inline-block; text-decoration:none; }
.volver-paywall-trial{ display:block; margin-top:12px; font-family:'Grenze', Georgia, serif; font-size:11.5px; color: var(--text-faint); }
/* Páginas do Premium em prévia (plano grátis): ver volver-app.js applyPagePreview */
body.pv-checking [data-pv]{ visibility:hidden; }
body.pv-preview [data-pv]{ user-select:none; }
.pv-lock{ margin:8px 0 26px; }
.pv-bar{ position:fixed; left:50%; bottom:16px; transform:translateX(-50%); z-index:60; display:flex; align-items:center; gap:14px;
  background:var(--panel); border:1px solid var(--gold); border-radius:99px; padding:8px 8px 8px 18px; box-shadow:0 8px 28px rgba(0,0,0,.35);
  font-size:13px; color:var(--text); max-width:calc(100% - 32px); }
.pv-bar a{ background:var(--gold); color:#12162A; font-weight:600; text-decoration:none; border-radius:99px; padding:7px 14px; white-space:nowrap; }
body.pv-preview{ padding-bottom:70px; }
.volver-trial-used .volver-paywall-trial{ display:none; }
.convite-banner{ font-family:'Grenze', Georgia, serif; font-size:12.5px; color:var(--gold); border:1px dashed rgba(217,164,65,.5); border-radius:12px; padding:10px 14px; margin:0 0 18px; }
@media print{ .pv-bar, .pv-lock{ display:none !important; } }

/* Boas-vindas e avisos de uso (cópia do index.html): aparecem logo depois do login,
   mesmo quando o login devolve o usuário para outra página (ex.: planos.html). */
.onboard-backdrop{
  position:fixed; inset:0; z-index:9998; background: rgba(10,12,24,0.82);
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none; transition: opacity .3s ease; padding:20px;
}
.onboard-backdrop.open{ opacity:1; pointer-events:auto; }
.onboard-modal{
  background: var(--panel); border:1px solid var(--panel-line); border-radius:18px;
  padding:30px 28px; max-width:440px; width:92vw; max-height:82vh; overflow-y:auto;
}
.onboard-dots{ display:flex; gap:6px; margin-bottom:18px; }
.onboard-dot{ width:6px; height:6px; border-radius:50%; background: var(--panel-line); transition: background .2s ease, width .2s ease; }
.onboard-dot.active{ background: var(--gold); width:18px; border-radius:4px; }
.onboard-eyebrow{
  font-family:'Grenze', Georgia, serif; font-style:italic; font-size:13px; 
  color: var(--gold); margin-bottom:10px;
}
.onboard-title{ font-family:'Grenze Gotisch', Georgia, serif; font-weight:700; font-size:23px; margin:0 0 14px; line-height:1.2; }
.onboard-body p{ font-size:14px; line-height:1.65; color: var(--text-dim); margin:0 0 12px; }
.onboard-body p:last-child{ margin-bottom:0; }
.onboard-body strong{ color: var(--text); }
.onboard-body a{ color: var(--gold); font-weight:600; }
.onboard-nav{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:24px; }
.onboard-btn{
  padding:11px 20px; border-radius:9px; border:none; cursor:pointer;
  font-family:'Grenze', Georgia, serif; font-size:13.5px; font-weight:600; transition: opacity .2s ease;
}
.onboard-btn.primary{ background: var(--gold); color: var(--bg); margin-left:auto; }
@media (hover: hover){ .onboard-btn.primary:hover{ opacity:.9; } }
.onboard-btn.ghost{ background:none; color: var(--text-faint); padding:11px 4px; }
@media (hover: hover){ .onboard-btn.ghost:hover{ color: var(--text); } }
.onboard-btn.is-hidden{ visibility:hidden; }
@media (max-width:520px){
  .onboard-modal{ padding:24px 20px; }
  .onboard-title{ font-size:20px; }
}

/* ---- balão de boas-vindas (antes do carrossel de onboarding) ---- */
.welcome-backdrop{
  position:fixed; inset:0; z-index:9998; background: rgba(10,12,24,0.82);
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none; transition: opacity .3s ease; padding:20px;
}
.welcome-backdrop.open{ opacity:1; pointer-events:auto; }
.welcome-modal{
  background: var(--panel); border:1px solid var(--panel-line); border-radius:18px;
  padding:32px 28px; max-width:400px; width:92vw; text-align:center;
}
.welcome-eyebrow{
  font-family:'Grenze', Georgia, serif; font-style:italic; font-size:13px; 
  color: var(--gold); margin-bottom:12px;
}
.welcome-title{ font-family:'Grenze Gotisch', Georgia, serif; font-weight:700; font-size:24px; margin:0 0 12px; line-height:1.25; }
.welcome-sub{ font-size:13.5px; line-height:1.6; color: var(--text-dim); margin:0 0 24px; }
.welcome-btn{
  padding:12px 28px; border-radius:9px; border:none; cursor:pointer; background: var(--gold);
  color: var(--bg); font-family:'Grenze', Georgia, serif; font-size:13.5px; font-weight:600;
  transition: opacity .2s ease;
}
@media (hover: hover){ .welcome-btn:hover{ opacity:.9; } }

/* Plano grátis: imprimir/salvar a reflexão em PDF é do Premium (volver-app.js, applyPrintGate). */
@media print{
  body.volver-no-print > *{ display:none !important; }
  body.volver-no-print::before{
    content: attr(data-print-note); display:block; padding:40px; font-family:'Grenze', Georgia, serif;
    font-size:16px; line-height:1.6; color:#000;
  }
}
/* ---- pintura de capa como fundo da introdução (.hero) das categorias e dos livros ---- */
.hero.has-art{ position:relative; isolation:isolate; }
.hero-art{
  position:absolute; z-index:-1; top:-34px; bottom:-10px; left:-22px; right:-22px; overflow:hidden; pointer-events:none;
  -webkit-mask-image: radial-gradient(closest-side at 50% 46%, #000 52%, transparent 100%);
          mask-image: radial-gradient(closest-side at 50% 46%, #000 52%, transparent 100%);
}
.hero-art img{ width:100%; height:100%; object-fit:cover; display:block; opacity:.34; }
:root[data-theme="light"] .hero-art img{ opacity:.22; }
.hero.has-art h1, .hero.has-art .lede{ text-shadow: 0 1px 14px var(--bg); }
.hero-art-credit{
  font-family:'Grenze', Georgia, serif; font-size:10.5px; line-height:1.45; 
  color: var(--text-faint); margin:18px 0 0; text-align:right;
}
.art-frame.wide{ aspect-ratio: 5 / 4; }

/* ---- tilt das molduras (script no fim do volver-app.js): inclinação 3D + brilho dourado que segue o ponteiro ---- */
.art-frame{ transition: transform .2s ease-out; }
.art-frame.tilting{ will-change:transform; }
.art-frame > .tilt-sheen{ position:absolute; inset:0; pointer-events:none; opacity:0; z-index:2; transition:opacity .3s ease;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(246,220,149,.18), transparent 55%); }
.art-frame.tilting > .tilt-sheen{ opacity:1; }

/* ===== trava de etapas: a etapa só avança com todas as interações feitas ===== */
.continue-btn.vg-locked{ opacity:.45; cursor:not-allowed; }
.vg-hint, .tl-card p.vg-hint{ font-family:'Grenze', Georgia, serif; font-size:12px; line-height:1.5; color: var(--text-faint); margin:8px 0 0; }
.vg-shake{ animation: vgShake .4s ease; }
.vg-pulse{ outline:2px solid var(--gold); outline-offset:3px; animation: vgPulse 1.2s ease 2; }
@keyframes vgShake{ 0%,100%{ transform:translateX(0); } 20%,60%{ transform:translateX(-5px); } 40%,80%{ transform:translateX(5px); } }
@keyframes vgPulse{ 0%,100%{ outline-color: var(--gold); } 50%{ outline-color: transparent; } }
@media (prefers-reduced-motion: reduce){ .vg-shake, .vg-pulse{ animation:none; } }

/* modo grupo: link abaixo do subtítulo das reflexões (volver-app.js) */
.group-link{ display:inline-flex; align-items:center; gap:7px; margin:-4px 0 18px; font-family:'Grenze', Georgia, serif; font-size:12px; color: var(--text-faint); text-decoration:none; border-bottom:1px solid transparent; transition: color .2s ease, border-color .2s ease; }
.group-link svg{ width:15px; height:15px; flex-shrink:0; }
.group-link svg circle, .group-link svg path{ stroke: currentColor; }
@media (hover: hover){ .group-link:hover{ color: var(--gold); border-bottom-color: rgba(217,164,65,.4); } }

/* cartão de compartilhar (volver-app.js: shareCard) */
.verse-card{ position:relative; }
.vc-share{ position:absolute; top:12px; right:12px; width:30px; height:30px; border-radius:50%; border:1px solid var(--panel-line); background: var(--panel); display:flex; align-items:center; justify-content:center; cursor:pointer; opacity:.55; padding:0; }
.vc-share svg{ width:14px; height:14px; }
.vc-share svg path{ stroke: var(--text-dim); }
.vc-share:focus-visible{ opacity:1; }
@media (hover: hover) and (pointer: fine){
  .verse-card:hover .vc-share{ opacity:1; }
  .vc-share:hover{ border-color: var(--gold); } .vc-share:hover svg path{ stroke: var(--gold); }
}
.vc-share:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; }
@media (hover:none){ .vc-share{ opacity:.8; } }
.card-modal{ position:fixed; inset:0; z-index:200; display:none; align-items:center; justify-content:center; padding:16px; background: rgba(6,8,18,.78); backdrop-filter: blur(4px); }
.card-modal.on{ display:flex; }
html.card-open{ overflow:hidden; }
.card-box{ position:relative; width:min(420px, 100%); max-height:100%; overflow:auto; background: var(--panel); border:1px solid var(--panel-line); border-radius:18px; padding:18px 18px 16px; box-sizing:border-box; }
.card-x{ position:absolute; top:10px; right:10px; width:32px; height:32px; border-radius:50%; border:1px solid var(--panel-line); background:none; color: var(--text-dim); font-size:18px; cursor:pointer; }
@media (hover: hover){ .card-x:hover{ border-color: var(--gold); color: var(--gold); } }
.card-h{ font-family:'Grenze Gotisch', Georgia, serif; font-weight:700; font-size:18px; color: var(--text); margin:2px 40px 12px 2px; }
.card-fmt{ display:flex; gap:8px; margin-bottom:12px; }
.card-fmt button{ flex:1; padding:8px; border-radius:10px; border:1px solid var(--panel-line); background: var(--bg); color: var(--text-dim); font-family:'Grenze', Georgia, serif; font-size:12.5px; cursor:pointer; }
.card-fmt button[aria-pressed="true"]{ border-color: var(--gold); color: var(--text); background: rgba(217,164,65,.12); }
.card-prev{ display:flex; justify-content:center; background: var(--bg); border-radius:12px; padding:10px; min-height:200px; }
.card-prev img{ display:block; width:auto; max-width:100%; max-height:min(56vh, 520px); border-radius:8px; box-shadow: 0 12px 30px -12px rgba(0,0,0,.7); }
.card-prev.sq img{ max-height:min(46vh, 380px); }
.card-act{ display:flex; gap:10px; margin-top:12px; }
.card-act button{ flex:1; padding:11px 12px; border-radius:11px; font-family:'Grenze', Georgia, serif; font-weight:600; font-size:13.5px; cursor:pointer; }
.card-share{ background: var(--gold); color: var(--bg); border:none; }
.card-dl{ background:none; border:1px solid var(--panel-line); color: var(--text-dim); }
@media (hover: hover){ .card-dl:hover{ border-color: var(--gold); color: var(--text); } }
.card-act button[hidden]{ display:none; }

/* Reflexão: oculta até o volver-app.js conferir o plano (applyLessonGate põe html.pv-gated).
   Sem isso, uma reflexão do Premium aparecia por um instante antes do aviso. */
html:not(.pv-gated) #timeline{ visibility:hidden; }
/* Selos dos cards das bibliotecas: só aparecem quando o plano é conhecido (html.pv-known),
   para o grátis não ver "Disponível" virar "Premium" na frente dele. */
html:not(.pv-known) .p-card .badge{ visibility:hidden; }

/* "Explorar a biblioteca" embaixo dos estados vazios: só aparece no celular (volver-mobile.css) */
.empty-cta{ display:none; }
