:root {
  --bg: #FBF6F1;
  --card: #FFFFFF;
  --ink: #2E2623;
  --soft: #8A7C76;
  --line: #EFE4DD;
  --rose: #C9736B;
  --rose-2: #E9B8B0;
  --rose-3: #F6E7E1;
  --sage: #9DB09A;
  --sage-2: #E4ECE1;
  --gold: #D9A55B;
  --radius: 22px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); }
body { min-height: 100dvh; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
#view { max-width: 480px; margin: 0 auto; padding: calc(18px + env(safe-area-inset-top)) 18px 24px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 34px; line-height: 1.1; }
h2 { font-size: 22px; }
p { line-height: 1.5; }
.muted { color: var(--soft); }
.small { font-size: 13px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 11px; color: var(--rose); font-weight: 700; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 14px 0;
  box-shadow: 0 6px 24px rgba(120, 80, 60, 0.06); }
.btn { appearance: none; border: 0; border-radius: 999px; padding: 15px 22px; font: 600 16px var(--sans); cursor: pointer;
  background: var(--ink); color: #FFF8F3; width: 100%; }
.btn.rose { background: var(--rose); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { width: auto; padding: 10px 16px; font-size: 14px; }
.btn:disabled { opacity: 0.45; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
input[type=text], input[type=time], textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px;
  font: 16px var(--sans); background: #FFFDFB; color: var(--ink); }
textarea { min-height: 80px; resize: vertical; }

/* onboarding */
.levels { display: grid; gap: 10px; margin: 16px 0; }
.level { text-align: left; border: 1.5px solid var(--line); background: var(--card); border-radius: 18px; padding: 14px 16px; cursor: pointer; }
.level.on { border-color: var(--rose); background: var(--rose-3); }
.level b { font-family: var(--serif); font-size: 18px; }

/* hoje */
.hero { display: flex; align-items: center; gap: 18px; }
.ring { width: 118px; height: 118px; flex: none; }
.ring text { font-family: var(--serif); }
.daynum { font-family: var(--serif); font-size: 44px; line-height: 1; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip { background: var(--sage-2); color: #4E6249; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 600; }
.chip.rose { background: var(--rose-3); color: var(--rose); }
.habit { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px dashed var(--line); cursor: pointer; user-select: none; }
.habit:last-child { border-bottom: 0; }
.habit .tick { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--rose-2); display: grid; place-items: center; flex: none;
  transition: transform .15s ease, background .2s ease; }
.habit.done .tick { background: var(--rose); border-color: var(--rose); transform: scale(1.06); }
.habit.done .tick::after { content: ""; width: 8px; height: 14px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -2px); }
.habit .label { font-size: 16px; }
.habit.done .label { color: var(--soft); text-decoration: line-through; text-decoration-color: var(--rose-2); }
.habit .emoji { font-size: 20px; width: 26px; text-align: center; }
.photo { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 16px; display: block; }
.lock { background: linear-gradient(160deg, #FFF8F3, var(--rose-3)); text-align: center; }
.price { font-family: var(--serif); font-size: 40px; margin: 6px 0 2px; }

/* jornada */
.grid75 { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.dot { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: 10px; color: var(--soft); background: #F3ECE7; cursor: pointer; border: 0; }
.dot.done { background: var(--rose); color: #fff; }
.dot.recovered { background: var(--gold); color: #fff; }
.dot.missed { background: #fff; border: 1.5px dashed var(--rose-2); }
.dot.today { outline: 2px solid var(--ink); outline-offset: 2px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--soft); margin-top: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }

/* barra de abas */
#tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 6px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(251, 246, 241, 0.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); }
.tab { flex: 1; max-width: 150px; border: 0; background: transparent; padding: 10px; border-radius: 999px; font: 600 14px var(--sans); color: var(--soft); }
.tab.on { background: var(--ink); color: #FFF8F3; }

#toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: #FFF8F3; padding: 12px 18px; border-radius: 999px; font-size: 14px; z-index: 20; max-width: 90vw; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 30; width: 100vw; height: 100vh; }
.install { background: var(--sage-2); border-color: transparent; }
[hidden] { display: none !important; }

/* faixa dos dias grátis, com compra antecipada */
.trial { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap;
  background: var(--rose-3, #F6E7E1); border-radius: 16px; padding: 10px 12px; margin: 14px 0; font-size: 14px; }
.trial .btn { width: auto; margin: 0; }
