@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --paper: #f7f2ea;
  --paper-2: #fffaf3;
  --paper-3: #eee5d8;
  --ink: #24313d;
  --ink-soft: #6e7780;
  --line: rgba(47, 63, 78, .12);
  --navy: #243847;
  --navy-2: #182b38;
  --blue: #60798e;
  --lavender: #b8b2c9;
  --sage: #9cab9e;
  --terracotta: #c97968;
  --coral: #d9947d;
  --gold: #c2a066;
  --gold-soft: rgba(194, 160, 102, .13);
  --f1: #526c78;
  --f1-soft: rgba(82,108,120,.13);
  --f2: #c29d5f;
  --f2-soft: rgba(194,157,95,.14);
  --f3: #b86f60;
  --f3-soft: rgba(184,111,96,.14);
  --f1-suave: var(--f1-soft); --f2-suave: var(--f2-soft); --f3-suave: var(--f3-soft);
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 30px;
  --shadow-sm: 0 6px 18px rgba(24,43,56,.06);
  --shadow: 0 18px 45px rgba(24,43,56,.10);
  --safe-bottom: max(12px, env(safe-area-inset-bottom));
  /* aliases mantidos para compatibilidade com componentes atuais */
  --creme: var(--paper); --bege: #f2ece3; --bege-escuro: #ddd3c5;
  --texto: var(--ink); --texto-suave: var(--ink-soft); --dourado: var(--gold); --dourado-suave: var(--gold-soft);
  --raio: var(--radius); --sombra: var(--shadow-sm);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% -10%, rgba(184,178,201,.18), transparent 34%),
    linear-gradient(180deg, #fbf7f0 0%, var(--paper) 65%);
  color: var(--ink);
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  line-height: 1.58;
  padding-bottom: calc(76px + var(--safe-bottom));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }

.app-header {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 40px 1fr 40px; align-items: center;
  min-height: 62px; padding: 8px 16px;
  background: rgba(247,242,234,.84);
  backdrop-filter: blur(18px) saturate(135%);
  border-bottom: 1px solid rgba(47,63,78,.08);
}
.logo {
  grid-column: 2;
  justify-self: center;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.05rem; font-weight: 600; letter-spacing: .2px;
  color: var(--navy);
}
.header-profile {
  grid-column: 3; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line);
  background: rgba(255,250,243,.72); color: var(--navy); cursor: pointer;
}

.app-main { width: min(100%, 580px); margin: 0 auto; padding: 20px 18px 28px; }
.tela { animation: rise .34s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

h1,h2,h3 { font-family: 'Fraunces', Georgia, serif; color: var(--ink); line-height: 1.14; }
h1 { font-size: clamp(1.78rem, 7vw, 2.25rem); margin-bottom: 7px; letter-spacing: -.025em; }
h2 { font-size: 1.35rem; margin: 28px 0 12px; }
h3 { font-size: 1.07rem; margin-bottom: 7px; }
p,li { color: var(--ink-soft); font-size: .92rem; }
strong { color: var(--ink); }
.subtitulo { color: var(--ink-soft); font-size: .86rem; margin-bottom: 18px; }
.eyebrow { font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--gold); }

.hero-shell {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); margin: 12px 0 18px;
  background: var(--navy-2); box-shadow: var(--shadow);
  aspect-ratio: 2 / 3; max-height: 590px;
}
.hero-shell .hero-abertura { width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: 0; margin: 0; }
.hero-shell::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,31,42,.04) 40%, rgba(15,31,42,.82) 100%);
  pointer-events: none;
}
.hero-copy { position: absolute; z-index: 2; left: 20px; right: 20px; bottom: 20px; color: white; }
.hero-copy .fase-tag { margin-bottom: 9px; color: #fff7ea; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.2); }
.hero-copy h2 { margin: 0 0 5px; color: white; font-size: 1.65rem; }
.hero-copy p { color: rgba(255,255,255,.82); max-width: 32ch; }

.hero-abertura { display: block; width: 100%; height: auto; margin: 0 auto 16px; border-radius: var(--radius); aspect-ratio: 9/16; object-fit: cover; }
/* Herois de fase (Dia 8, Dia 15, transicoes) */
.fase-hero { display: block; width: 100%; height: auto; margin: 0 auto 14px; border-radius: var(--radius); aspect-ratio: 9/16; object-fit: cover; object-position: 50% 30%; max-width: 420px; }

.card {
  position: relative;
  background: linear-gradient(145deg, rgba(255,250,243,.96), rgba(250,246,239,.88));
  border: 1px solid rgba(47,63,78,.085);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 13px;
  box-shadow: 0 8px 26px rgba(24,43,56,.055);
}
.card-destaque { padding: 20px; overflow: hidden; }
.card-destaque::after { content:''; position:absolute; width:110px; height:110px; border-radius:50%; right:-35px; top:-45px; background: var(--f1-soft); }
.fase-f2 .card-destaque::after { background: var(--f2-soft); }
.fase-f3 .card-destaque::after { background: var(--f3-soft); }

.fase-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px; border: 1px solid transparent;
  font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px;
}
.fase-f1 .fase-tag { background: var(--f1-soft); color: var(--f1); border-color: rgba(82,108,120,.16); }
.fase-f2 .fase-tag { background: var(--f2-soft); color: #9a773d; border-color: rgba(194,157,95,.18); }
.fase-f3 .fase-tag { background: var(--f3-soft); color: var(--f3); border-color: rgba(184,111,96,.18); }
/* sobre a imagem do hero, usar creme p/ contraste */
.hero-copy .fase-tag { color: var(--paper); background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); }

.barra { height: 8px; border-radius: 999px; overflow: hidden; background: #e9e1d5; margin: 13px 0 7px; }
.barra-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--gold), var(--terracotta)); transition: width .55s ease; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 13px 16px; margin-bottom: 9px;
  border: 1px solid transparent; border-radius: 16px; cursor: pointer;
  font-size: .9rem; font-weight: 700; letter-spacing: .01em;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:active { transform: scale(.985); }
.btn-primario { background: var(--navy); color: white; box-shadow: 0 10px 25px rgba(36,56,71,.18); }
.fase-f1 .btn-primario { background: var(--f1); }
.fase-f2 .btn-primario { background: #aa864e; }
.fase-f3 .btn-primario { background: var(--f3); }
.btn-secundario { background: rgba(255,250,243,.7); color: var(--ink); border-color: var(--line); }
.btn-perigo { background: transparent; color: var(--f3); border-color: rgba(184,111,96,.35); }

.fase-header { margin: 24px 0 12px; padding: 0; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); }
.fase-header h2 { margin: 0 0 4px; font-size: 1.22rem; }
.fase-header p { font-size: .82rem; }
.fh-f1 { background: linear-gradient(135deg, rgba(82,108,120,.12), rgba(184,178,201,.11)); }
.fh-f2 { background: linear-gradient(135deg, rgba(194,157,95,.14), rgba(255,250,243,.85)); }
.fh-f3 { background: linear-gradient(135deg, rgba(184,111,96,.13), rgba(255,250,243,.85)); }
.phase-cover { padding: 0; overflow: hidden; }
.phase-cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 45%; display: block; }
.phase-cover-copy { padding: 16px 17px 17px; }
/* Enquadramento individual por fase (ajustar o % vertical se a arte pedir) */
.fh-f1 .phase-cover img { object-position: center 45%; }
.fh-f2 .phase-cover img { object-position: center 45%; }
.fh-f3 .phase-cover img { object-position: center 45%; }

.dia-item {
  position: relative; display: grid; grid-template-columns: 44px 1fr 18px; align-items: center; gap: 12px;
  padding: 14px; margin-bottom: 9px; border-radius: 18px;
  background: rgba(255,250,243,.88); border: 1px solid rgba(47,63,78,.09); box-shadow: var(--shadow-sm); cursor: pointer;
}
.dia-num { width: 42px; height: 42px; border-radius: 50%; display:grid; place-items:center; background:#ece5da; color:var(--ink-soft); font-family:'Fraunces',serif; font-weight:700; }
.dia-item .info strong { display:block; font-size:.9rem; line-height:1.28; margin-bottom:2px; }
.dia-item .info small { color:var(--ink-soft); font-size:.74rem; line-height:1.28; display:block; }
.dia-item.concluido { opacity: .72; }
.dia-item.concluido .dia-num { background: var(--sage); color:white; }
.dia-item.concluido .info strong { text-decoration: line-through; text-decoration-color: rgba(36,49,61,.35); }

textarea, input[type='text'], input[type='number'], select {
  width:100%; border:1px solid rgba(47,63,78,.12); border-radius:16px; background:#f2ece3; color:var(--ink);
  padding:14px; font-size:.92rem; outline:none; transition:border-color .16s, box-shadow .16s, background .16s;
}
textarea { min-height:118px; resize:vertical; }
textarea:focus, input:focus, select:focus { border-color: rgba(96,121,142,.55); box-shadow: 0 0 0 4px rgba(96,121,142,.10); background:#faf7f1; }
input[type='range'] { width:100%; accent-color: var(--gold); }
.field-label { display:block; font-size:.78rem; font-weight:700; color:var(--ink); margin:12px 0 6px; }

.video-placeholder {
  aspect-ratio: 16/9; display:grid; place-items:center; text-align:center; padding:18px; margin-bottom:14px;
  border-radius: var(--radius); border:1px dashed rgba(96,121,142,.26);
  background: linear-gradient(135deg, rgba(96,121,142,.08), rgba(184,178,201,.08)); color:var(--ink-soft); font-size:.82rem;
}
.dia-grande { font-family:'Fraunces',serif; font-size:3.4rem; line-height:.95; font-weight:700; margin:3px 0 5px; letter-spacing:-.04em; }
.fase-f1 .dia-grande { color:var(--f1); } .fase-f2 .dia-grande { color:#aa864e; } .fase-f3 .dia-grande { color:var(--f3); }

.streak { display:inline-flex; align-items:center; gap:6px; padding:6px 11px; border-radius:999px; margin-top:10px; background:var(--gold-soft); color:#96733f; font-size:.76rem; font-weight:700; }
.quote { position:relative; padding:17px 18px 17px 22px; border-radius: 4px 18px 18px 4px; background:linear-gradient(90deg,rgba(194,160,102,.13),rgba(184,178,201,.08)); color:var(--ink); font-family:'Fraunces',serif; font-style:italic; font-size:1.04rem; }
.quote::before { content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--gold); border-radius:99px; }

.mapa-grupo {
  position: relative;
  margin: 28px 0 34px;
  padding: 22px 18px 8px;
  border: 1px solid rgba(47,63,78,.08);
  border-radius: 26px;
  background: rgba(255,250,243,.56);
}
.mapa-grupo::before {
  content:'';
  position:absolute;
  left:18px;
  right:18px;
  top:0;
  height:1px;
  background: linear-gradient(90deg, transparent, rgba(194,160,102,.58), transparent);
}
.mapa-grupo-cabecalho {
  display:grid;
  grid-template-columns: 42px 1fr;
  gap:12px;
  align-items:start;
  margin-bottom:18px;
}
.mapa-grupo-cabecalho h2 { margin:0 0 4px; font-size:1.22rem; }
.mapa-grupo-cabecalho p { font-size:.8rem; }
.mapa-grupo-num {
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:50%;
  font-family:'Fraunces',serif;
  font-size:.82rem;
  color:#8f6f3d;
  border:1px solid rgba(194,160,102,.34);
  background:rgba(194,160,102,.08);
}
.mapa-grupo-1 { background:linear-gradient(160deg, rgba(82,108,120,.07), rgba(255,250,243,.62) 38%); }
.mapa-grupo-2 { background:linear-gradient(160deg, rgba(194,157,95,.075), rgba(255,250,243,.62) 38%); }
.mapa-grupo-3 { background:linear-gradient(160deg, rgba(184,111,96,.065), rgba(255,250,243,.62) 38%); }

.mapa-cat { margin-bottom:22px; }
.mapa-cat h3 {
  color:#8f6d3a;
  margin-bottom:9px;
  font-size:1rem;
}
.mapa-vazio {
  font-style:italic;
  color:var(--ink-soft);
  opacity:.76;
  font-size:.84rem;
  line-height:1.5;
}
.mapa-item, #relatorio .item-rel {
  padding:13px 14px;
  margin-bottom:8px;
  border-radius:15px;
  background:rgba(255,252,247,.94);
  border:1px solid rgba(47,63,78,.085);
  color:var(--ink);
  box-shadow:0 5px 16px rgba(24,43,56,.04);
}
.mapa-item {
  display:grid;
  grid-template-columns:auto 1fr;
  gap:10px;
  align-items:start;
}
.mapa-item p { color:var(--ink); font-size:.86rem; }
.mapa-dia {
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 8px;
  border-radius:999px;
  background:var(--gold-soft);
  color:#8f6d3a;
  font-size:.66rem;
  font-weight:700;
  white-space:nowrap;
}
.mapa-item strong, #relatorio .item-rel strong { color:#94713d; }

.comp-linha { margin-bottom:18px; }
.comp-linha strong { display:block; font-size:.83rem; margin-bottom:5px; }
.comp-barras { display:flex; align-items:center; gap:6px; }
.comp-barra { height:9px; border-radius:99px; transition:width .45s ease; }
.comp-d1 { background:#d8d0c5; } .comp-d21 { background:linear-gradient(90deg,var(--blue),var(--gold)); }
.comp-num { min-width:48px; font-size:.72rem; color:var(--ink-soft); }
.comp-dif { display:inline-block; margin-top:5px; padding:3px 9px; border-radius:99px; font-size:.7rem; font-weight:700; }
.dif-pos{background:rgba(156,171,158,.17);color:#617565}.dif-neg{background:rgba(184,111,96,.14);color:var(--f3)}.dif-zero{background:#ece5da;color:var(--ink-soft)}
.evidencia { display:flex; justify-content:space-between; align-items:center; padding:14px 16px; margin-bottom:8px; border-radius:17px; background:rgba(255,250,243,.9); border:1px solid var(--line); color:var(--ink); }
.evidencia strong { font-family:'Fraunces',serif; font-size:1.25rem; color:#94713d; }

#relatorio { margin-top:28px; }
#relatorio h2 { font-size:1.08rem; color:#94713d; padding-bottom:6px; margin:24px 0 9px; border-bottom:1px solid var(--line); }

.nav-bottom {
  position:fixed; left:50%; transform:translateX(-50%); bottom:0; z-index:40;
  width:min(100%,580px); display:grid; grid-template-columns:repeat(4,1fr);
  background:rgba(255,250,243,.91); backdrop-filter:blur(20px) saturate(150%);
  border:1px solid rgba(47,63,78,.10); border-bottom:none; border-radius:24px 24px 0 0;
  padding:7px 8px var(--safe-bottom); box-shadow:0 -8px 30px rgba(24,43,56,.08);
}
.nav-btn { position:relative; min-height:54px; border:0; background:none; color:#80868a; cursor:pointer; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:2px; font-size:1.12rem; border-radius:15px; }
.nav-btn span { font-size:.59rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; }
.nav-btn.ativo { color:var(--navy); background:rgba(96,121,142,.08); }
.nav-btn.ativo::before { content:''; position:absolute; top:4px; width:18px; height:2px; border-radius:99px; background:var(--gold); }

.toast { position:fixed; z-index:100; left:50%; bottom:calc(88px + var(--safe-bottom)); transform:translate(-50%,12px); width:min(calc(100% - 36px),460px); padding:13px 15px; border-radius:15px; background:rgba(24,43,56,.96); color:#fff; box-shadow:var(--shadow); opacity:0; pointer-events:none; transition:.22s ease; font-size:.82rem; text-align:center; }
.toast.show { opacity:1; transform:translate(-50%,0); }

:focus-visible { outline:3px solid rgba(194,160,102,.55); outline-offset:3px; }
@media (min-width:700px) { .app-main{padding-top:28px}.hero-shell{max-height:620px}.nav-bottom{bottom:14px;border-radius:24px;border-bottom:1px solid rgba(47,63,78,.1)}body{padding-bottom:110px} }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important} }

@media print {
  body { background:#fff; padding-bottom:0; }
  .app-header,.nav-bottom,.btn,.video-placeholder,.nota,.toast,button { display:none!important; }
  body * { visibility:hidden; }
  #relatorio,#relatorio * { visibility:visible; }
  #relatorio { position:absolute; inset:0 auto auto 0; width:100%; padding:0 10mm; }
  #relatorio h2 { color:#8b6b39; border-bottom:1px solid #ddd; page-break-after:avoid; }
  #relatorio .item-rel { box-shadow:none; border:1px solid #e7e2dc; break-inside:avoid; }
}

.dia-item.bloqueado { opacity: .62; }
.dia-item.bloqueado .dia-num { background: #ece5da; color: var(--ink-soft); }
.libera-em { display: block; margin-top: 4px; color: #96733f; font-size: .72rem; font-weight: 700; }

/* ---------- Tarot: montinhos fechados e cartas ---------- */
.pilhas { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 14px; }
.pilha { background: rgba(255,250,243,.9); border: 1px solid var(--line); border-radius: 16px; padding: 16px 8px 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 12px; transition: transform .2s ease, box-shadow .2s ease; }
.pilha:active { transform: scale(.97); }
@media (hover:hover) { .pilha:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); } }
.pilha strong { font-family: 'Fraunces',serif; font-size: .85rem; color: var(--ink); }

/* verso das cartas — estilo editorial do projeto */
.pilha-cartas { position: relative; width: 52px; height: 74px; display: block; }
.pilha-cartas span { position: absolute; inset: 0; background: #f6efe4; border: 1px solid rgba(194,160,102,.5); border-radius: 8px; box-shadow: 0 2px 6px rgba(24,43,56,.10); }
.pilha-cartas span::before { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(36,56,71,.18); border-radius: 5px; }
.pilha-cartas span::after { content: ''; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; background: var(--gold); transform: translate(-50%,-50%) rotate(45deg); border-radius: 1px; opacity: 0; }
.pilha-cartas span:nth-child(3)::after { opacity: 1; }
.pilha-cartas span:nth-child(1) { transform: rotate(-7deg) translateX(-5px); }
.pilha-cartas span:nth-child(2) { transform: rotate(5deg) translateX(5px); background: #f9f3e9; }
.pilha-cartas span:nth-child(3) { transform: rotate(0deg); background: #f4ead9; }

.pilha-bloqueada { display: flex; align-items: center; gap: 8px; opacity: .55; filter: saturate(.7); padding: 8px 0; color: var(--ink-soft); font-size: .82rem; }
.pilha-bloqueada .app-icon { width: 16px; height: 16px; }

.carta-tarot { animation: revelar .5s ease both; }
.carta-tarot + .carta-tarot { margin-top: 18px; }
@keyframes revelar { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.carta-tarot img {
  display: block;
  width: min(72vw, 300px);
  height: auto;
  margin: 0 auto 12px;
  border-radius: 10px;
  object-fit: contain;
  aspect-ratio: auto;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 560px) {
  .carta-tarot img { width: min(80vw, 320px); }
}
.carta-img { border: 1px solid var(--line); }
.pilhas-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }

@media (max-width: 380px) {
  .pilhas { grid-template-columns: repeat(2, 1fr); }
  .pilhas .pilha:last-child { grid-column: 1 / -1; max-width: 52%; margin: 0 auto; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .carta-tarot { animation: none; }
  .pilha { transition: none; }
}

.day-hero { margin-bottom: 14px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); aspect-ratio: 16/9; background: var(--navy-2); }
.day-hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; display: block; }

/* ---------- Player de condução (Dia 1) ---------- */
.audio-player { text-align: center; }
.ap-controls { display: flex; justify-content: center; gap: 14px; margin-bottom: 12px; }
.ap-controls button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255,250,243,.9); font-size: .9rem; cursor: pointer; color: var(--navy);
}
.ap-controls button#apPlay { width: 56px; height: 56px; background: var(--navy); color: white; font-size: 1.1rem; }
#apSeek { width: 100%; accent-color: var(--gold); }
.ap-time { font-size: .78rem; color: var(--ink-soft); margin-top: 4px; }
.ap-speed { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.ap-speed button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: .78rem; cursor: pointer; }
.ap-speed button.active { background: var(--gold-soft); border-color: var(--gold); color: #96733f; font-weight: 700; }
.ap-done { margin-top: 10px; font-size: .82rem; color: var(--sage); font-weight: 700; }
.ap-erro { margin-top: 10px; font-size: .82rem; color: var(--terracotta); font-weight: 600; }
.ap-erro button { margin-left: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: .78rem; font-weight: 700; color: var(--navy); cursor: pointer; }

/* ---------- Aviso persistente de sincronização (piloto) ---------- */
#avisoSync { margin: 0 0 12px; padding: 12px 15px; border-radius: 15px; border: 1px solid var(--gold); background: var(--gold-soft); color: var(--ink); font-size: .82rem; }
#avisoSync strong { display: block; margin-bottom: 2px; }

/* ---------- Icones do app (sprite Despertar) ---------- */
.app-icon { width: 20px; height: 20px; flex: 0 0 auto; color: var(--ink-soft); }
.stat-icon { width: 18px; height: 18px; vertical-align: -4px; margin-right: 8px; }
.nav-btn .app-icon { width: 21px; height: 21px; color: inherit; }
.nav-btn { align-items: center; gap: 2px; }
.btn-perigo .app-icon { color: var(--terracotta); }
.header-profile .app-icon { width: 20px; height: 20px; }


/* ---------- Refinos v4: perfil, mapa e microinterações ---------- */
.sr-only {
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

.unlock-note {
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid rgba(47,63,78,.08);
  font-size:.78rem;
}
.unlock-note strong { color:#8f6d3a; }

.action-title {
  display:flex;
  align-items:center;
  gap:9px;
}
.action-title::before {
  content:'';
  width:22px;
  height:22px;
  border-radius:50% 50% 46% 54%;
  border:1px solid rgba(194,160,102,.5);
  background:
    radial-gradient(circle at 55% 45%, rgba(194,160,102,.22) 0 18%, transparent 19%),
    rgba(194,160,102,.06);
  box-shadow: inset 0 0 0 5px rgba(255,250,243,.58);
}

.perfil-tela { padding-bottom:8px; }
.perfil-intro { margin-bottom:18px; }
.perfil-intro .subtitulo { max-width:42ch; }

.perfil-nome-card {
  overflow:hidden;
  padding:20px;
}
.perfil-nome-card::after {
  content:'';
  position:absolute;
  width:130px;
  height:130px;
  right:-62px;
  top:-66px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(194,160,102,.15), transparent 70%);
  pointer-events:none;
}
.perfil-card-head {
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:16px;
}
.perfil-card-head .eyebrow { margin-bottom:3px; }
.perfil-card-head h3 { margin:0; }

.profile-feature-icon {
  width:46px;
  height:46px;
  flex:0 0 auto;
  color:var(--navy);
  padding:8px;
  border-radius:18px 18px 18px 7px;
  background:linear-gradient(145deg, rgba(96,121,142,.12), rgba(194,160,102,.09));
  border:1px solid rgba(96,121,142,.14);
}

.perfil-name-row {
  display:grid;
  grid-template-columns:1fr auto;
  gap:9px;
  align-items:center;
}
.perfil-name-row input { min-width:0; }
.btn-inline {
  width:auto;
  min-height:48px;
  margin:0;
  padding-inline:17px;
}

.perfil-section-head { margin:28px 2px 12px; }
.perfil-section-head h2 { margin:3px 0 0; font-size:1.24rem; }

.profile-stats {
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}
.profile-stat {
  min-height:142px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-end;
  gap:4px;
  padding:15px;
  border-radius:21px;
  border:1px solid rgba(47,63,78,.08);
  background:linear-gradient(150deg, rgba(255,250,243,.96), rgba(247,242,234,.78));
  box-shadow:0 7px 20px rgba(24,43,56,.045);
  overflow:hidden;
  position:relative;
}
.profile-stat::after {
  content:'';
  position:absolute;
  width:64px;
  height:64px;
  border-radius:50%;
  right:-24px;
  top:-22px;
  background:rgba(194,160,102,.06);
}
.profile-stat-icon {
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  margin-bottom:auto;
  border-radius:14px 14px 14px 5px;
  color:var(--navy);
  background:rgba(96,121,142,.085);
  border:1px solid rgba(96,121,142,.11);
}
.profile-stat-icon svg { width:24px; height:24px; }
.profile-stat strong {
  position:relative;
  z-index:1;
  font-family:'Fraunces', Georgia, serif;
  font-size:1.42rem;
  line-height:1.05;
  color:var(--navy);
  max-width:100%;
  overflow-wrap:anywhere;
}
.profile-stat span:last-child {
  position:relative;
  z-index:1;
  font-size:.69rem;
  line-height:1.25;
  color:var(--ink-soft);
  font-weight:600;
}
.profile-stat-4 .profile-stat-icon,
.profile-stat-5 .profile-stat-icon { color:#9a773d; background:rgba(194,160,102,.10); border-color:rgba(194,160,102,.15); }
.profile-stat-6 {
  grid-column:1 / -1;
  min-height:118px;
  background:linear-gradient(140deg, rgba(82,108,120,.10), rgba(255,250,243,.9));
}
.profile-stat-6 .profile-stat-icon { color:var(--f1); }
.profile-stat-6 strong { font-size:1.28rem; }

.profile-account-card {
  padding:7px 17px;
}
.profile-account-row {
  display:grid;
  grid-template-columns:38px 1fr;
  gap:11px;
  align-items:center;
  min-height:66px;
}
.profile-account-row + .profile-account-row {
  border-top:1px solid rgba(47,63,78,.075);
}
.profile-account-row .profile-stat-icon {
  width:34px;
  height:34px;
  margin:0;
}
.profile-account-row .profile-stat-icon svg { width:21px; height:21px; }
.profile-account-row small {
  display:block;
  margin-bottom:2px;
  color:var(--ink-soft);
  font-size:.68rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:700;
}
.profile-account-row strong {
  display:block;
  font-size:.84rem;
  font-weight:600;
}
.sync-orb {
  width:11px;
  height:11px;
  margin-left:11px;
  border-radius:50%;
  background:var(--sage);
  box-shadow:0 0 0 7px rgba(156,171,158,.10);
}

.profile-actions {
  margin-top:18px;
  padding-top:6px;
}
.profile-actions .btn-perigo { margin-top:5px; }

.progress-highlight {
  background:linear-gradient(145deg, rgba(194,160,102,.10), rgba(255,250,243,.92));
}
.progress-highlight h3 { margin-top:4px; }

.dia-item:focus-visible {
  outline:3px solid rgba(194,160,102,.45);
  outline-offset:2px;
}

@media (max-width:360px) {
  .profile-stats { grid-template-columns:1fr; }
  .profile-stat-6 { grid-column:auto; }
  .perfil-name-row { grid-template-columns:1fr; }
  .btn-inline { width:100%; }
}

@media (min-width:700px) {
  .profile-stats { grid-template-columns:repeat(3, minmax(0,1fr)); }
  .profile-stat-6 { grid-column:auto; }
  .mapa-grupo { padding:24px 22px 10px; }
}
.mapa-item p, #relatorio .item-rel { white-space: pre-wrap; overflow-wrap: anywhere; }
