@font-face {
  font-family: "Fredoka";
  src: url(fonts/fredoka-latin.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --rosa-50: #fff4f8; --rosa-100: #ffe6ef; --rosa-200: #ffcfe0; --rosa-300: #ffaecb;
  --rosa-400: #ff86b3; --rosa-500: #f4619a; --rosa-600: #d9437f; --rosa-800: #8a2a55;
  --ameixa: #5b2543; --ameixa-suave: #946079;
  --creme: #fff9ef; --manteiga: #ffe9a6; --menta: #c4efd8; --folha: #69c995;
  --lilas: #dccdff; --ceu: #bfe6ff; --agua: #7cc8ff; --agua-esc: #3f9fe6; --pessego: #ffd6bd;
  --sombra: 0 10px 24px rgba(217, 67, 127, .16);
  --raio: 28px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Fredoka", ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  color: var(--ameixa);
  background: var(--rosa-50);
  background-image:
    radial-gradient(420px 320px at 8% 4%, #ffd9e8 0%, transparent 70%),
    radial-gradient(380px 300px at 100% 30%, #e9ddff 0%, transparent 70%),
    radial-gradient(420px 320px at 0% 80%, #d8f5e5 0%, transparent 70%);
  background-attachment: fixed;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.35;
}
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

.app {
  max-width: 480px; margin: 0 auto; min-height: 100dvh;
  padding: calc(env(safe-area-inset-top) + 14px) 16px calc(104px + env(safe-area-inset-bottom));
}

/* ---------- topo ---------- */
.topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 0; }
.topo h1 { font-size: 26px; font-weight: 700; letter-spacing: -.2px; }
.topo .data { font-size: 14px; color: var(--ameixa-suave); font-weight: 500; }
.topo .data::first-letter { text-transform: uppercase; }
.selo {
  display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 2px solid var(--rosa-100);
  border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 15px; box-shadow: 0 4px 10px rgba(217, 67, 127, .1);
}

/* ---------- cartões ---------- */
.card {
  background: #fff; border: 2px solid var(--rosa-100); border-radius: var(--raio);
  padding: 16px; margin-top: 14px; box-shadow: var(--sombra);
}
.card h2 { font-size: 18px; font-weight: 600; }
.card .sub { color: var(--ameixa-suave); font-size: 14px; font-weight: 500; }

.heroi {
  position: relative; padding: 0; overflow: hidden;
  background: linear-gradient(180deg, #ffd3e5 0%, #ffe9f1 55%, #fff6ea 100%);
}
.cena-wrap { position: relative; }
.vitrine { width: min(330px, 88%); margin: 0 auto; }
.heroi svg.cena { width: 100%; height: auto; display: block; }
.balao {
  position: absolute; left: 14px; top: 14px; max-width: 58%; background: #fff; color: var(--ameixa);
  border-radius: 20px 20px 20px 6px; padding: 9px 13px; font-weight: 600; font-size: 14px; line-height: 1.25;
  box-shadow: 0 8px 18px rgba(217, 67, 127, .18); animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) both;
}
.heroi .info {
  position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; pointer-events: none;
}
.pilula {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .92); border-radius: 999px;
  padding: 7px 14px; font-weight: 600; font-size: 14px; box-shadow: 0 6px 14px rgba(217, 67, 127, .16);
}
.pilula small { font-weight: 500; color: var(--ameixa-suave); font-size: 13px; }

.dias { display: flex; justify-content: center; gap: 8px; padding: 12px 8px 14px; background: #fff; }
.dia {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 700;
  background: var(--rosa-100); color: #e9a3bf; box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--rosa-200);
}
.dia.ok { background: linear-gradient(#ffb7d3, var(--rosa-400)); color: #fff; box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--rosa-300); }
.dia.hoje { background: #fff; color: var(--rosa-500); box-shadow: inset 0 0 0 2px #fff, 0 0 0 3px var(--manteiga), 0 0 0 5px #fff4c9; }
.dia.hoje.ok { background: linear-gradient(#ffb7d3, var(--rosa-400)); color: #fff; }

/* ---------- água ---------- */
.agua-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.vol { font-size: 24px; font-weight: 700; color: var(--agua-esc); }
.vol small { font-size: 14px; color: var(--ameixa-suave); font-weight: 500; }
.barra {
  height: 22px; margin-top: 10px; border-radius: 999px; background: #e3f4ff; overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(63, 159, 230, .22);
}
.barra i {
  display: block; height: 100%; min-width: 22px; border-radius: 999px; position: relative;
  background: linear-gradient(90deg, #9ad9ff, #52b4f3); transition: width .9s cubic-bezier(.3, 1.3, .5, 1);
}
.barra i::after { content: ""; position: absolute; left: 10px; right: 10px; top: 4px; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .55); }
.copos { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0 6px; justify-content: center; }
.copo { width: 20px; height: 26px; }
.copo.cheio { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
.acoes { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.acoes .btn.grande { flex: 1; white-space: nowrap; padding: 15px 10px; font-size: 17px; min-width: 0; }
.acoes .btn.redondo { width: 46px; height: 46px; }

/* ---------- botões ---------- */
.btn {
  border: 0; cursor: pointer; font-weight: 700; border-radius: 999px; padding: 14px 22px; color: #fff; font-size: 17px;
  background: linear-gradient(#ff9cc3, var(--rosa-500)); box-shadow: 0 5px 0 #c93a78, 0 12px 20px rgba(244, 97, 154, .32);
  transition: transform .08s, box-shadow .08s; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #c93a78, 0 4px 8px rgba(244, 97, 154, .3); }
.btn.agua { background: linear-gradient(#9ad9ff, #46a5ec); box-shadow: 0 5px 0 #2a82c6, 0 12px 20px rgba(63, 159, 230, .3); }
.btn.agua:active { box-shadow: 0 1px 0 #2a82c6, 0 4px 8px rgba(63, 159, 230, .3); }
.btn.verde { background: linear-gradient(#9fe3bd, #4fbf84); box-shadow: 0 5px 0 #34996a, 0 12px 20px rgba(79, 191, 132, .3); }
.btn.verde:active { box-shadow: 0 1px 0 #34996a, 0 4px 8px rgba(79, 191, 132, .3); }
.btn.suave {
  background: #fff; color: var(--rosa-600); border: 2px solid var(--rosa-200); box-shadow: 0 4px 0 var(--rosa-200); padding: 12px 18px; font-size: 16px;
}
.btn.suave:active { box-shadow: 0 1px 0 var(--rosa-200); }
.btn.redondo { width: 50px; height: 50px; padding: 0; font-size: 20px; flex: none; }
.btn.grande { padding: 16px 24px; font-size: 18px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.link { background: none; box-shadow: none; color: var(--rosa-600); padding: 8px 10px; font-size: 15px; }
.btn.perigo { background: #fff; color: #c4365f; border: 2px solid #ffc7d6; box-shadow: 0 4px 0 #ffc7d6; }

/* ---------- remédios ---------- */
.dose { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.dose + .dose { border-top: 2px dashed var(--rosa-100); }
.dose .quem { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dose .ico {
  width: 44px; height: 44px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(#e9ddff, var(--lilas));
}
.dose b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dose span { font-size: 14px; color: var(--ameixa-suave); font-weight: 500; }
.dose.atrasada .ico { background: linear-gradient(#ffe0e8, #ffc2d3); }
.dose.atrasada span { color: #d9437f; font-weight: 600; }
.dose.feita .ico { background: linear-gradient(#d4f5e2, var(--menta)); }
.dose.feita b { color: var(--ameixa-suave); }
.tomei { padding: 10px 16px; font-size: 16px; white-space: nowrap; flex: none; }
.dose .feito { display: inline-flex; align-items: center; gap: 6px; color: #2f9366; font-weight: 700; background: none; border: 0; cursor: pointer; padding: 8px 4px; }

/* ---------- vazio / convite ---------- */
.convite { text-align: center; padding: 22px 18px 24px; }
.convite h2 { font-size: 22px; }
.convite p { color: var(--ameixa-suave); margin: 6px 0 16px; font-weight: 500; }

/* ---------- coleção ---------- */
.titulo-pg { padding: 6px 4px 0; }
.titulo-pg h1 { font-size: 26px; font-weight: 700; }
.titulo-pg p { color: var(--ameixa-suave); font-weight: 500; font-size: 15px; }
.grade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.item {
  -webkit-appearance: none; appearance: none; font: inherit; color: inherit;
  background: #fff; border: 2px solid var(--rosa-100); border-radius: 22px; padding: 6px 6px 10px; text-align: center;
  box-shadow: 0 6px 14px rgba(217, 67, 127, .1); cursor: pointer; transition: transform .12s;
}
.item:active { transform: scale(.96); }
.item .nome { font-size: 11.5px; line-height: 1.15; font-weight: 600; min-height: 27px; display: flex; align-items: center; justify-content: center; padding: 0 2px; }
.item.ouro { border-color: #ffd86a; background: linear-gradient(#fffbe6, #fff); }
.item.nova { animation: pop .6s cubic-bezier(.3, 1.6, .5, 1); }
.flor-mini { width: 100%; height: auto; display: block; }
.stat {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; background: linear-gradient(135deg, #fff, #fff0f6);
  border: 2px solid var(--rosa-100); border-radius: 24px; padding: 12px 14px; box-shadow: var(--sombra);
}
.stat .emoji { font-size: 30px; }
.stat b { font-weight: 700; color: var(--rosa-600); }
.stat span { font-size: 14px; color: var(--ameixa-suave); font-weight: 500; display: block; }
.vazio-colecao { text-align: center; padding: 34px 20px; color: var(--ameixa-suave); font-weight: 500; }
.vazio-colecao .grande { font-size: 56px; display: block; margin-bottom: 8px; }

/* ---------- ajustes ---------- */
.linha { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.linha + .linha { border-top: 2px dashed var(--rosa-100); }
.linha label, .linha .rotulo { font-weight: 600; }
.linha .dica { display: block; font-size: 13px; color: var(--ameixa-suave); font-weight: 500; }
.interruptor { position: relative; width: 54px; height: 32px; flex: none; }
.interruptor input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.interruptor i { position: absolute; inset: 0; border-radius: 999px; background: #eadbe2; transition: background .2s; }
.interruptor i::after {
  content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 5px rgba(91, 37, 67, .25); transition: transform .25s cubic-bezier(.3, 1.5, .5, 1);
}
.interruptor input:checked + i { background: linear-gradient(#ff9cc3, var(--rosa-500)); }
.interruptor input:checked + i::after { transform: translateX(22px); }
.campo {
  width: 100%; font: inherit; font-weight: 500; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--rosa-200);
  background: #fff; color: var(--ameixa); outline: none; min-width: 0; -webkit-appearance: none; appearance: none;
}
.campo:focus { border-color: var(--rosa-400); box-shadow: 0 0 0 4px rgba(255, 134, 179, .22); }
input[type="time"].campo { width: auto; min-width: 120px; text-align: center; }
.aviso-ios {
  background: linear-gradient(135deg, #fff6d9, #fff); border: 2px solid #ffe49a; border-radius: 22px; padding: 12px 14px; font-size: 14px; font-weight: 500; margin-top: 12px;
}
.aviso-ios b { font-weight: 700; }

/* ---------- abas ---------- */
.abas {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(456px, calc(100% - 24px)); display: flex; gap: 6px; padding: 7px; border-radius: 30px; z-index: 20;
  background: rgba(255, 255, 255, .85); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 2px solid #fff; box-shadow: 0 10px 30px rgba(217, 67, 127, .24);
}
.aba {
  flex: 1; display: grid; justify-items: center; gap: 1px; padding: 8px 4px 7px; border-radius: 23px; border: 0; background: none;
  font-size: 12px; font-weight: 600; color: #b07a95; cursor: pointer; transition: background .2s, color .2s;
}
.aba .e { font-size: 22px; line-height: 1.1; filter: grayscale(.5) opacity(.7); transition: filter .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.aba.on { background: linear-gradient(#ffe3ee, #ffd0e2); color: var(--rosa-600); }
.aba.on .e { filter: none; transform: scale(1.12); }

/* ---------- folhas (sheet) ---------- */
.camada { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(91, 37, 67, .42); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: aparece .2s; }
.camada.centro { align-items: center; padding: 18px; }
.folha {
  background: #fff9fb; width: min(480px, 100%); max-height: 92dvh; overflow: auto; border-radius: 32px 32px 0 0;
  padding: 10px 18px calc(24px + env(safe-area-inset-bottom)); animation: sobe .38s cubic-bezier(.2, 1.1, .3, 1); -webkit-overflow-scrolling: touch;
}
.camada.centro .folha { border-radius: 32px; padding-top: 22px; animation: pop .45s cubic-bezier(.3, 1.4, .5, 1); }
.folha .pegador { width: 44px; height: 5px; border-radius: 9px; background: var(--rosa-200); margin: 0 auto 14px; }
.folha h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.folha .intro { color: var(--ameixa-suave); font-weight: 500; margin-bottom: 14px; }
.rotulo-campo { display: block; font-weight: 600; font-size: 14px; margin: 16px 0 6px; color: var(--ameixa); }
.escolhas { display: grid; gap: 8px; }
.escolha {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 20px; background: #fff;
  border: 2px solid var(--rosa-200); cursor: pointer; transition: border-color .15s, background .15s, transform .1s;
}
.escolha:active { transform: scale(.98); }
.escolha .e { font-size: 26px; }
.escolha b { display: block; font-weight: 600; }
.escolha span { font-size: 13px; color: var(--ameixa-suave); font-weight: 500; }
.escolha.on { border-color: var(--rosa-400); background: linear-gradient(135deg, #fff, #ffeaf2); box-shadow: 0 0 0 3px rgba(255, 134, 179, .22); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 15px; border-radius: 999px; border: 2px solid var(--rosa-200); background: #fff; font-weight: 600; font-size: 15px; cursor: pointer; color: var(--ameixa);
}
.chip.on { background: linear-gradient(#ffb7d3, var(--rosa-400)); border-color: var(--rosa-400); color: #fff; }
.passo { display: flex; align-items: center; justify-content: center; gap: 18px; background: #fff; border: 2px solid var(--rosa-100); border-radius: 22px; padding: 10px; }
.passo .valor { font-size: 30px; font-weight: 700; min-width: 110px; text-align: center; color: var(--agua-esc); }
.passo .valor small { font-size: 16px; font-weight: 600; color: var(--ameixa-suave); }
.horarios { display: grid; gap: 8px; }
.horario { display: flex; gap: 8px; align-items: center; }
.horario .campo { flex: 1; }
.sub-form { background: #fff; border: 2px solid var(--rosa-100); border-radius: 22px; padding: 4px 14px 14px; margin-top: 12px; }
.nota { font-size: 13px; color: var(--ameixa-suave); font-weight: 500; margin-top: 10px; }
.rodape-folha { display: grid; gap: 10px; margin-top: 20px; }

/* ---------- flor aberta (modal) ---------- */
.flor-grande { width: min(300px, 78%); margin: 0 auto; display: block; }
.modal-flor { text-align: center; }
.modal-flor h2 { margin-top: 6px; }
.modal-flor .recado { margin: 10px 4px 16px; font-weight: 500; color: var(--ameixa-suave); }
.etiquetas { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.etiqueta { background: #fff; border: 2px solid var(--rosa-100); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.etiqueta.ouro { background: #fff3c4; border-color: #ffd86a; color: #8a6200; }

/* ---------- instalar no iPhone ---------- */
.instalar { min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 14px; text-align: center; padding: 28px 22px; }
.instalar h1 { font-size: 28px; }
.instalar p { color: var(--ameixa-suave); font-weight: 500; }
.passos { text-align: left; width: 100%; display: grid; gap: 10px; margin: 6px 0; }
.passo-i { display: flex; gap: 12px; align-items: center; background: #fff; border: 2px solid var(--rosa-100); border-radius: 22px; padding: 12px 14px; font-weight: 600; box-shadow: 0 6px 14px rgba(217, 67, 127, .1); }
.passo-i .n { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; background: linear-gradient(#ffb7d3, var(--rosa-400)); color: #fff; font-weight: 700; }
.passo-i svg { width: 22px; height: 22px; vertical-align: -5px; }

/* ---------- aviso rápido ---------- */
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 70; pointer-events: none; display: grid; justify-items: center; gap: 6px; width: min(440px, 92%); }
.toast {
  background: var(--ameixa); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 15px; box-shadow: 0 10px 22px rgba(91, 37, 67, .3);
  animation: toast 2.4s ease both; text-align: center;
}

/* ---------- pétalas caindo ---------- */
.petala { position: fixed; top: -24px; z-index: 80; pointer-events: none; width: 16px; height: 22px; border-radius: 80% 0 80% 0; animation: cair-petala linear forwards; }

/* ---------- animações ---------- */
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes sobe { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast { 0% { transform: translateY(14px) scale(.9); opacity: 0; } 12%, 80% { transform: none; opacity: 1; } 100% { transform: translateY(-8px); opacity: 0; } }
@keyframes cair-petala { 0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 1; } 100% { transform: translate3d(var(--dx), 110vh, 0) rotate(var(--giro)); opacity: .9; } }
@keyframes deriva { from { transform: translateX(-14px); } to { transform: translateX(22px); } }
@keyframes flutua { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-9px); opacity: .95; } }
@keyframes brilha { 0%, 100% { opacity: .2; transform: scale(.55); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes zzz { 0% { transform: translate(0, 0); opacity: 0; } 30% { opacity: .9; } 100% { transform: translate(6px, -12px); opacity: 0; } }
@keyframes regador {
  0% { opacity: 0; transform: translate(46px, -14px) rotate(0); }
  16% { opacity: 1; transform: translate(0, 0) rotate(0); }
  32%, 78% { opacity: 1; transform: translate(0, 0) rotate(-27deg); }
  100% { opacity: 0; transform: translate(36px, -14px) rotate(0); }
}
@keyframes gota {
  0% { opacity: 0; transform: translate(0, 0); }
  12% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), 150px); }
}
@keyframes pulo { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-9px) scale(1.02); } 65% { transform: translateY(0) scale(.99); } }
@keyframes pulso { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

.cena .nuvem { animation: deriva 22s ease-in-out infinite alternate; }
.cena .nuvem.n2 { animation-duration: 30s; animation-direction: alternate-reverse; }
.cena .nuvem.n3 { animation-duration: 26s; }
.cena .flutua { animation: flutua 5s ease-in-out infinite; }
.cena .flutua.b { animation-duration: 6.5s; }
.cena .flutua.c { animation-duration: 7.5s; }
.cena .sol { transform-box: fill-box; transform-origin: center; animation: pulso 6s ease-in-out infinite; }
.brilha { transform-box: fill-box; transform-origin: center; animation: brilha 2.4s ease-in-out infinite; }
.halo { transform-box: fill-box; transform-origin: center; animation: pulso 3.5s ease-in-out infinite; }
.cena .zzz { animation: zzz 3.4s ease-in-out infinite; }
.cena .regador { transform-box: fill-box; transform-origin: 50% 50%; opacity: 0; }
.cena .gota { opacity: 0; }
.cena.regando .regador { animation: regador 2.5s ease-in-out both; }
.cena.regando .gota { animation: gota .85s ease-in calc(.75s + var(--i) * .15s) 1 both; }
.cena.pulando .planta-g, .cena.pulando .cabeca { animation: pulo .7s ease-out 1.2s 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; }
}
