/* Floressa — feito para ser fácil de ler e de tocar.
   Letra grande, contraste alto, um botão principal por tela, alvos de toque de 80px+. */

:root {
  --fundo: #F5F1E6;
  --papel: #FFFDF8;
  --linha: #E4DCCB;
  --tinta: #1C271F;
  --tinta-suave: #47544A;

  --verde: #2C6A3D;
  --verde-escuro: #1E4C2B;
  --verde-claro: #E2EDDB;

  --sol: #A65F00;
  --sol-fundo: #FCEED3;
  --agua: #1B649E;
  --agua-fundo: #E1EDF7;
  --terra: #85502A;
  --terra-fundo: #F3E5D6;
  --alerta: #B0261C;
  --alerta-fundo: #FBE3DF;

  --raio: 24px;
  --sombra: 0 1px 2px rgba(40, 35, 20, .06), 0 6px 18px rgba(40, 35, 20, .07);
  --fonte: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fonte-titulo: "Fraunces", Georgia, "Times New Roman", serif;

  color-scheme: light;
}

/* O tamanho da letra muda tudo de uma vez: todo o layout é medido em rem. */
html { font-size: 20px; -webkit-text-size-adjust: 100%; }
html[data-letra="grande"] { font-size: 23px; }
html[data-letra="maior"] { font-size: 26px; }

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--fundo);
  color: var(--tinta);
  font-family: var(--fonte);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom);
}

h1, h2, p, ul, ol { margin: 0; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

svg { width: 1em; height: 1em; flex: none; }

:focus-visible {
  outline: 4px solid #F2B705;
  outline-offset: 3px;
  border-radius: 12px;
}

/* ---------- Topo ---------- */

/* O topo não cresce com a letra: ele já é grande e precisa caber na largura do celular. */
.topo {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75em;
  max-width: 34rem; /* acompanha a largura do conteúdo */
  margin: 0 auto;
  padding: calc(.75em + env(safe-area-inset-top)) 1em .5em;
}

.marca { display: flex; align-items: center; gap: .5em; }

.marca-selo {
  display: grid;
  place-items: center;
  width: 2.1em;
  height: 2.1em;
  border-radius: 50%;
  background: var(--verde);
  color: #fff;
  font-size: 1.35em;
}

.marca-nome {
  font-family: var(--fonte-titulo);
  font-size: 1.2em;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--verde-escuro);
}


.botao-letra {
  display: flex;
  align-items: baseline;
  gap: .1em;
  min-height: 3em;
  padding: .4em .9em;
  border: 2px solid var(--linha);
  border-radius: 999px;
  background: var(--papel);
  color: var(--tinta);
  cursor: pointer;
}
.letra-a { font-weight: 700; font-size: .85em; line-height: 1; }
.letra-a.grande { font-size: 1.2em; margin-right: .35em; }
.botao-letra-texto { font-size: .8em; font-weight: 700; color: var(--tinta-suave); }
.botao-letra:active { transform: scale(.97); }

.aviso-demo {
  max-width: 32rem;
  margin: .25rem auto 0;
  padding: .45rem .9rem;
  border-radius: 999px;
  background: var(--sol-fundo);
  color: #6B3D00;
  font-size: .75rem;
  font-weight: 700;
  text-align: center;
  width: calc(100% - 40px);
}

/* ---------- Estrutura das telas ---------- */

main { max-width: 34rem; margin: 0 auto; padding: 0 20px 2.5rem; }

.tela { animation: entrar .35s ease-out; }
@keyframes entrar { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Botões ---------- */

.acoes { display: grid; gap: .8rem; margin-top: 1.4rem; }

.botao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  width: 100%;
  min-height: 4.2rem;
  padding: .9rem 1.25rem;
  border-radius: 22px;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.botao svg { font-size: 1.75rem; }
.botao:active { transform: scale(.98); }

.botao-principal {
  border: 0;
  background: var(--verde);
  color: #fff;
  min-height: 5rem;
  font-size: 1.2rem;
  box-shadow: 0 2px 0 var(--verde-escuro), 0 10px 24px rgba(44, 106, 61, .28);
}
.botao-principal svg { font-size: 2.1rem; }
.botao-principal:hover { background: #2F7342; }

.botao-secundario {
  border: 2px solid var(--verde);
  background: var(--papel);
  color: var(--verde-escuro);
}
.botao-secundario:hover { background: #FAFCF7; }

.entrada-escondida { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- 1. Início ---------- */

.tela-inicio { text-align: center; padding-top: .5rem; }

.ilustracao { display: flex; justify-content: center; margin: .25rem 0 .9rem; }

.ilustracao-circulo {
  position: relative;
  display: grid;
  place-items: center;
  width: 7.4rem;
  height: 7.4rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F1F7EC 0%, var(--verde-claro) 70%);
  box-shadow: inset 0 0 0 1px rgba(44, 106, 61, .08);
}
.ilustracao-folha { width: 4rem; height: 4rem; color: var(--verde); }

/* Cantos de "mira" de câmera em volta da folha */
.mira {
  position: absolute;
  width: 1.15rem;
  height: 1.15rem;
  border: 0 solid var(--verde-escuro);
  opacity: .8;
}
.mira-1 { top: 1.25rem; left: 1.25rem; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 8px; }
.mira-2 { top: 1.25rem; right: 1.25rem; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 8px; }
.mira-3 { bottom: 1.25rem; left: 1.25rem; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 8px; }
.mira-4 { bottom: 1.25rem; right: 1.25rem; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 8px; }

.titulo-inicio {
  font-family: var(--fonte-titulo);
  font-size: 1.95rem;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--verde-escuro);
}

.texto-inicio {
  max-width: 21rem;
  margin: .65rem auto 0;
  font-size: 1.1rem;
  color: var(--tinta-suave);
}

.dicas {
  margin-top: 2rem;
  padding: 1.15rem 1.15rem 1.25rem;
  border-radius: var(--raio);
  background: var(--papel);
  border: 1px solid var(--linha);
  text-align: left;
}
.dicas-titulo { font-size: 1rem; font-weight: 700; color: var(--tinta-suave); margin-bottom: .7rem; }
.dicas-lista { list-style: none; padding: 0; display: grid; gap: .7rem; }
.dicas-lista li { display: flex; align-items: center; gap: .8rem; font-size: 1rem; }

.dica-icone {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 14px;
  background: var(--verde-claro);
  color: var(--verde);
  font-size: 1.4rem;
  flex: none;
}

/* ---------- Moldura da foto ---------- */

.moldura-foto {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #DDD6C6;
  aspect-ratio: 4 / 3;
  box-shadow: var(--sombra);
}
.moldura-foto img { width: 100%; height: 100%; object-fit: cover; }
.moldura-foto.pequena { width: 11rem; margin: 1rem auto 0; aspect-ratio: 1; border-radius: 24px; }

/* ---------- 2. Analisando ---------- */

.tela-analisando { text-align: center; padding-top: 1rem; }
.moldura-foto.analisando { aspect-ratio: 1; max-width: 19rem; margin: 0 auto; }

.varredura {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(226, 237, 219, 0) 40%, rgba(226, 237, 219, .55) 50%, rgba(226, 237, 219, 0) 60%, transparent 100%);
  background-size: 100% 220%;
  animation: varrer 2.4s ease-in-out infinite;
}
.varredura::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 4px solid rgba(255, 255, 255, .85);
  border-radius: 28px;
}
@keyframes varrer { 0% { background-position: 0 100%; } 50% { background-position: 0 0; } 100% { background-position: 0 100%; } }

.titulo-analisando {
  margin-top: 1.6rem;
  font-family: var(--fonte-titulo);
  font-size: 1.65rem;
  line-height: 1.2;
  color: var(--verde-escuro);
}
.texto-analisando { margin-top: .4rem; font-size: 1.05rem; color: var(--tinta-suave); }

.pontinhos { display: flex; justify-content: center; gap: .55rem; margin-top: 1.25rem; }
.pontinhos span {
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  background: var(--verde);
  animation: pulsar 1.2s ease-in-out infinite;
}
.pontinhos span:nth-child(2) { animation-delay: .15s; }
.pontinhos span:nth-child(3) { animation-delay: .3s; }
@keyframes pulsar { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

/* ---------- 3. Resultado ---------- */

.cabeca-resultado { text-align: center; padding-top: .5rem; }

.selo-certeza {
  display: inline-flex;
  margin-top: 1.25rem;
  padding: .35rem 1rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
  background: var(--verde-claro);
  color: var(--verde-escuro);
}
.selo-certeza[data-certeza="media"] { background: var(--sol-fundo); color: #6B3D00; }
.selo-certeza[data-certeza="baixa"] { background: #EDE7DA; color: var(--tinta-suave); }

.nome-popular {
  margin-top: .55rem;
  font-family: var(--fonte-titulo);
  font-size: 2.2rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--verde-escuro);
  overflow-wrap: anywhere;
  hyphens: auto;
}
.nome-popular:focus { outline: none; }

.nome-cientifico { margin-top: .35rem; font-style: italic; font-size: 1.05rem; color: var(--tinta-suave); }
.outros-nomes { margin-top: .15rem; font-size: .95rem; color: var(--tinta-suave); }

.resumo {
  margin: 1rem auto 0;
  max-width: 28rem;
  font-size: 1.1rem;
  line-height: 1.5;
}

.botao-ouvir {
  margin-top: 1.25rem;
  border: 2px solid var(--verde);
  background: var(--verde-claro);
  color: var(--verde-escuro);
}
.botao-ouvir.ouvindo { background: var(--verde-escuro); border-color: var(--verde-escuro); color: #fff; }

/* Cartões */

.cartoes { display: grid; gap: 1rem; margin-top: 1.75rem; }

.cartao {
  --cor: var(--verde);
  --cor-fundo: var(--verde-claro);
  padding: 1.15rem 1.15rem 1.25rem;
  border-radius: var(--raio);
  background: var(--papel);
  border: 1px solid var(--linha);
  box-shadow: var(--sombra);
}
.cartao-luz { --cor: var(--sol); --cor-fundo: var(--sol-fundo); }
.cartao-rega { --cor: var(--agua); --cor-fundo: var(--agua-fundo); }
.cartao-adubo { --cor: var(--terra); --cor-fundo: var(--terra-fundo); }
.cartao-atencao { --cor: var(--alerta); --cor-fundo: #fff; background: var(--alerta-fundo); border-color: #F1C4BD; box-shadow: none; }
.cartao-atencao.seguro { --cor: var(--verde); --cor-fundo: #fff; background: var(--verde-claro); border-color: #C9DDBF; }

.cartao-topo { display: flex; align-items: center; gap: .75rem; }
.cartao-topo h2 { font-size: 1.15rem; font-weight: 700; color: var(--cor); }

.cartao-icone {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 16px;
  background: var(--cor-fundo);
  color: var(--cor);
  font-size: 1.6rem;
  flex: none;
}

.cartao-destaque {
  margin-top: .8rem;
  font-family: var(--fonte-titulo);
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--tinta);
}
.cartao-texto { margin-top: .6rem; font-size: 1.05rem; line-height: 1.5; }
.cartao-atencao .cartao-texto { margin-top: .5rem; font-weight: 700; color: #5E120C; }
.cartao-atencao.seguro .cartao-texto { font-weight: 400; color: var(--tinta); }

/* Escala de 3 níveis (luz e água) */
.escala {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .35rem;
  margin-top: .85rem;
  padding: .3rem;
  list-style: none;
  border-radius: 16px;
  background: #F2EDE2;
}
.escala li {
  display: grid;
  place-items: center;
  min-height: 2.6rem;
  padding: .3rem .25rem;
  border-radius: 12px;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  color: #6A6556;
}
.escala li.ativo {
  background: var(--cor);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

/* Cuidados */
.lista-cuidados { list-style: none; padding: 0; margin-top: .85rem; display: grid; gap: .7rem; }
.lista-cuidados li {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  font-size: 1.05rem;
  line-height: 1.45;
}
.lista-cuidados svg {
  margin-top: .05rem;
  width: 1.55rem;
  height: 1.55rem;
  padding: .2rem;
  border-radius: 50%;
  background: var(--verde-claro);
  color: var(--verde);
}

.acoes-fim { margin-top: 2rem; }

/* ---------- 4. Problema ---------- */

.tela-problema { text-align: center; padding-top: 1rem; }
.titulo-problema {
  margin-top: 1.5rem;
  font-family: var(--fonte-titulo);
  font-size: 1.75rem;
  line-height: 1.2;
  color: var(--verde-escuro);
}
.titulo-problema:focus { outline: none; }
.texto-problema { max-width: 24rem; margin: .7rem auto 0; font-size: 1.1rem; }

/* ---------- Telas largas (tablet / computador) ---------- */

@media (min-width: 760px) {
  .cartoes { grid-template-columns: 1fr 1fr; }
  .cartao-adubo, .cartao-cuidados, .cartao-atencao { grid-column: 1 / -1; }
  main, .topo { max-width: 46rem; }
  .tela-inicio, .tela-analisando, .tela-problema, .cabeca-resultado, .acoes { max-width: 32rem; margin-left: auto; margin-right: auto; }
  .moldura-foto { max-width: 32rem; margin-left: auto; margin-right: auto; }
}

/* Menos movimento para quem pediu isso no celular */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================
   Floressa — abas, minhas plantas, lembretes, folhas e avisos
   ===================================================================== */

:root {
  --altura-abas: 76px;
  --sombra-forte: 0 2px 4px rgba(40, 35, 20, .06), 0 14px 32px rgba(40, 35, 20, .12);
}

body { padding-bottom: calc(var(--altura-abas) + env(safe-area-inset-bottom) + 12px); }

/* ---------- Barra de abas (tamanho fixo para caber em qualquer letra) ---------- */

.abas {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px max(10px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 253, 248, .96);
  border-top: 1px solid var(--linha);
  box-shadow: 0 -6px 20px rgba(40, 35, 20, .06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 16px;
}
.aba {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 60px;
  padding: 6px 4px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--tinta-suave);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
}
.aba svg { width: 27px; height: 27px; }
.aba.ativa { background: var(--verde-claro); color: var(--verde-escuro); }
.aba:active { transform: scale(.97); }
.aba-icone { position: relative; display: inline-flex; }
.aba-contador {
  position: absolute;
  top: -6px; right: -11px;
  min-width: 21px; height: 21px;
  padding: 0 5px;
  border-radius: 999px;
  border: 2px solid #FFFDF8;
  background: #D9480F;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

/* ---------- Topo: nome ---------- */
.marca-nome { color: var(--verde-escuro); }

/* ---------- Idiomas ---------- */

.idiomas { margin-top: 1.5rem; display: grid; gap: .55rem; justify-items: center; }
.idiomas-titulo { font-size: .8rem; font-weight: 700; color: var(--tinta-suave); }
.idiomas-botoes { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; }
.idioma {
  min-height: 2.6rem;
  padding: .35rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--linha);
  background: var(--papel);
  font-size: .85rem;
  font-weight: 700;
  color: var(--tinta-suave);
  cursor: pointer;
}
.idioma[aria-pressed="true"] { border-color: var(--verde); background: var(--verde-claro); color: var(--verde-escuro); }

/* ---------- Resultado: guardar e lembretes da planta ---------- */

.botao-guardar {
  margin-top: 1.5rem;
  border: 0;
  background: linear-gradient(135deg, #2F7342, #1E4C2B);
  color: #fff;
  min-height: 4.6rem;
  font-size: 1.15rem;
  box-shadow: 0 10px 24px rgba(44, 106, 61, .3);
}

.bloco-lembrar {
  margin-top: 1.5rem;
  padding: 1.15rem;
  border-radius: var(--raio);
  background: linear-gradient(160deg, #FFFDF8 0%, #F1F7EC 100%);
  border: 2px solid #CFE2C6;
  box-shadow: var(--sombra);
  animation: entrar .4s ease-out;
}
.bloco-lembrar-topo { display: flex; gap: .8rem; align-items: center; }
.bloco-lembrar-topo h2 { font-size: 1.1rem; line-height: 1.25; color: var(--verde-escuro); }
.bloco-lembrar-topo p { font-size: .9rem; color: var(--tinta-suave); line-height: 1.35; margin-top: .15rem; }
.bloco-lembrar-sino {
  display: grid; place-items: center; flex: none;
  width: 2.9rem; height: 2.9rem;
  border-radius: 16px;
  background: var(--verde); color: #fff;
  font-size: 1.5rem;
}
.linhas-lembrar { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; margin-top: 1rem; }
.linha-lembrar {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem .75rem;
  border-radius: 18px;
  background: var(--papel);
  border: 1px solid var(--linha);
}
.chip-tarefa {
  display: grid; place-items: center; flex: none;
  width: 2.6rem; height: 2.6rem;
  border-radius: 14px;
  font-size: 1.35rem;
}
.tipo-rega .chip-tarefa { background: var(--agua-fundo); color: var(--agua); }
.tipo-adubo .chip-tarefa { background: var(--terra-fundo); color: var(--terra); }
.linha-lembrar-textos { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.linha-lembrar-textos strong { font-size: 1.05rem; }
.linha-lembrar-textos span { font-size: .85rem; color: var(--tinta-suave); }

.pilula {
  display: inline-flex; align-items: center; gap: .35rem; flex: none;
  min-height: 3rem;
  padding: .4rem .95rem;
  border-radius: 999px;
  border: 2px solid var(--verde);
  background: var(--verde);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
}
.pilula svg { font-size: 1.15rem; }
.pilula.ligada { background: var(--verde-claro); color: var(--verde-escuro); }
.pilula:active { transform: scale(.97); }

.botao-perigo { border: 2px solid #E8C2BC; background: var(--papel); color: var(--alerta); }
.botao-perigo-cheio { border: 0; background: var(--alerta); color: #fff; }
.botao-texto-perigo { border: 0; background: transparent; color: var(--alerta); min-height: 3.6rem; font-size: 1rem; }

.check { display: inline-flex; }

/* ---------- Títulos de aba ---------- */

.titulo-aba {
  padding-top: .6rem;
  font-family: var(--fonte-titulo);
  font-size: 2rem;
  line-height: 1.12;
  letter-spacing: -.015em;
  color: var(--verde-escuro);
}
.titulo-aba:focus { outline: none; }
.subtitulo-aba { margin-top: .2rem; font-size: 1rem; color: var(--tinta-suave); }

/* ---------- Minhas plantas ---------- */

.grade-plantas { display: grid; grid-template-columns: repeat(2, 1fr); gap: .85rem; margin-top: 1.1rem; }
.planta-cartao {
  display: grid; gap: .5rem; align-content: start;
  padding: .55rem .55rem .8rem;
  border-radius: 22px;
  border: 1px solid var(--linha);
  background: var(--papel);
  box-shadow: var(--sombra);
  text-align: left;
  cursor: pointer;
}
.planta-cartao:active { transform: scale(.98); }
.planta-foto { position: relative; display: block; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: #DDD6C6; }
.planta-foto img { width: 100%; height: 100%; object-fit: cover; }
.planta-selos { position: absolute; left: .4rem; bottom: .4rem; display: flex; gap: .3rem; }
.selo-mini {
  display: grid; place-items: center;
  width: 1.9rem; height: 1.9rem;
  border-radius: 50%;
  background: #fff;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}
.selo-mini.tipo-rega { color: var(--agua); }
.selo-mini.tipo-adubo { color: var(--terra); }
.planta-nome {
  padding: 0 .25rem;
  font-family: var(--fonte-titulo);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--verde-escuro);
  overflow-wrap: anywhere;
}

/* ---------- Estado vazio ---------- */

.vazio { margin-top: 1.5rem; padding: 1.75rem 1.25rem; text-align: center; border-radius: var(--raio); background: var(--papel); border: 2px dashed #D9CFBB; }
.vazio-ilustracao {
  display: inline-grid; place-items: center;
  width: 5.5rem; height: 5.5rem;
  border-radius: 50%;
  background: var(--verde-claro);
  color: var(--verde);
  font-size: 3rem;
}
.vazio-ilustracao.sino { background: var(--sol-fundo); color: var(--sol); }
.vazio h2 { margin-top: 1rem; font-family: var(--fonte-titulo); font-size: 1.4rem; line-height: 1.2; color: var(--verde-escuro); }
.vazio p { margin: .5rem auto 0; max-width: 22rem; color: var(--tinta-suave); }
.vazio .botao { margin-top: 1.4rem; }

/* ---------- Lembretes: resumo do dia ---------- */

.resumo-dia {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 1rem;
  padding: 1.2rem 1.25rem;
  border-radius: 26px;
  background: radial-gradient(120% 140% at 100% 0%, #3E8A52 0%, var(--verde) 45%, var(--verde-escuro) 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(30, 76, 43, .3);
}
.resumo-dia-data { font-size: .85rem; font-weight: 700; color: #CFE6C8; }
.resumo-dia-titulo { margin-top: .2rem; font-family: var(--fonte-titulo); font-size: 1.55rem; line-height: 1.15; }
.resumo-dia-sub { margin-top: .3rem; font-size: .9rem; color: #E2EDDB; line-height: 1.35; }
.resumo-dia-sub:empty { display: none; }

.anel { position: relative; flex: none; width: 4.4rem; height: 4.4rem; }
.anel > svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anel circle { fill: none; stroke-width: 5; }
.anel-fundo { stroke: rgba(255, 255, 255, .22); }
.anel-valor { stroke: #FFE08A; stroke-linecap: round; stroke-dasharray: 0 200; transition: stroke-dasharray .6s ease; }
.anel-icone {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 1.7rem; color: rgba(255, 255, 255, .35);
  transition: color .3s ease;
}
.resumo-dia.completo .anel-icone { color: #FFE08A; }

.nota-web {
  margin-top: .8rem;
  padding: .7rem .9rem;
  border-radius: 14px;
  background: var(--sol-fundo);
  color: #6B3D00;
  font-size: .85rem;
  line-height: 1.4;
}

/* ---------- Lembretes: grupos e cartões ---------- */

.grupo { margin-top: 1.6rem; }
.grupo-titulo { font-size: 1.05rem; font-weight: 700; color: var(--tinta-suave); margin-bottom: .65rem; }
.lista-lembretes { list-style: none; padding: 0; display: grid; gap: .75rem; }

.lembrete {
  display: flex; align-items: stretch;
  border-radius: 22px;
  background: var(--papel);
  border: 1px solid var(--linha);
  box-shadow: var(--sombra);
  overflow: hidden;
  transition: transform .35s ease, opacity .35s ease;
}
.lembrete.concluindo { transform: scale(.97); opacity: .4; }
.lembrete-corpo {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: .85rem;
  padding: .8rem .8rem .8rem .8rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.lembrete-foto { position: relative; flex: none; width: 4.2rem; height: 4.2rem; }
.lembrete-foto img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; background: #DDD6C6; }
.lembrete-tipo {
  position: absolute; right: -.35rem; bottom: -.35rem;
  display: grid; place-items: center;
  width: 1.9rem; height: 1.9rem;
  border-radius: 50%;
  border: 3px solid var(--papel);
  color: #fff;
  font-size: .95rem;
}
.tipo-rega .lembrete-tipo { background: var(--agua); }
.tipo-adubo .lembrete-tipo { background: var(--terra); }

.lembrete-textos { display: grid; gap: .1rem; min-width: 0; line-height: 1.25; }
.lembrete-tarefa { font-size: .8rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.tipo-rega .lembrete-tarefa { color: var(--agua); }
.tipo-adubo .lembrete-tarefa { color: var(--terra); }
.lembrete-planta { font-family: var(--fonte-titulo); font-size: 1.15rem; color: var(--tinta); overflow-wrap: anywhere; }
.lembrete-quando { display: inline-flex; align-items: center; gap: .3rem; margin-top: .15rem; font-size: .9rem; font-weight: 700; color: var(--tinta); }
.lembrete-quando svg { font-size: 1.05rem; color: var(--tinta-suave); }
.lembrete-quando.atrasado { color: var(--alerta); }
.lembrete-quando.atrasado svg { color: var(--alerta); }
.lembrete-quando.ok { color: var(--verde); }
.lembrete-quando.ok svg { color: var(--verde); }
.lembrete-freq { font-size: .8rem; color: var(--tinta-suave); }

.lembrete.pendente { flex-direction: column; }
.botao-feito {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.5rem;
  margin: 0 .8rem .8rem;
  border: 0;
  border-radius: 16px;
  background: var(--verde);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 2px 0 var(--verde-escuro);
  cursor: pointer;
}
.botao-feito svg { font-size: 1.5rem; }
.botao-feito:active { transform: scale(.98); }
.lembrete.pendente:has(.atrasado) { border-color: #F1C4BD; }
.lembrete.feito { box-shadow: none; background: #FBFAF5; }
.lembrete.feito .lembrete-foto img { filter: saturate(.6); opacity: .85; }
.lembrete.desligado { opacity: .6; box-shadow: none; }
.lembrete-seta { display: grid; place-items: center; padding: 0 .9rem 0 .2rem; color: #A39C8A; font-size: 1.3rem; }

/* ---------- Folha (janela que sobe de baixo) ---------- */

.folha {
  width: 100%;
  max-width: 34rem;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 28px 28px 0 0;
  background: var(--papel);
  color: var(--tinta);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .2);
}
.folha[open] { animation: subir .28s ease-out; }
.folha::backdrop { background: rgba(28, 39, 31, .45); }
@keyframes subir { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.folha-conteudo { display: grid; gap: 1rem; padding: .6rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom)); }
.folha-alca { justify-self: center; width: 3rem; height: 5px; border-radius: 999px; background: #D9CFBB; }
.folha-topo { display: flex; align-items: center; gap: .85rem; }
.folha-topo > div { flex: 1; min-width: 0; }
.folha-foto { width: 3.6rem; height: 3.6rem; border-radius: 16px; object-fit: cover; flex: none; background: #DDD6C6; }
.folha-tarefa { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.folha[data-tipo="rega"] .folha-tarefa { color: var(--agua); }
.folha[data-tipo="adubo"] .folha-tarefa { color: var(--terra); }
.folha-titulo { font-family: var(--fonte-titulo); font-size: 1.35rem; line-height: 1.15; overflow-wrap: anywhere; }
.botao-icone {
  display: grid; place-items: center; flex: none;
  width: 3rem; height: 3rem;
  border: 0; border-radius: 50%;
  background: #F2EDE2; color: var(--tinta);
  font-size: 1.3rem;
  cursor: pointer;
}

.ajuste { display: grid; gap: .45rem; padding: .9rem; border-radius: 20px; background: #F7F3EA; }
.ajuste-rotulo { font-size: .9rem; font-weight: 700; color: var(--tinta-suave); }
.ajuste-controle { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.ajuste-valor { flex: 1; text-align: center; font-family: var(--fonte-titulo); font-size: 1.6rem; font-weight: 700; color: var(--tinta); }
.botao-passo {
  display: grid; place-items: center; flex: none;
  width: 3.6rem; height: 3.6rem;
  border-radius: 50%;
  border: 2px solid var(--verde);
  background: var(--papel);
  color: var(--verde-escuro);
  font-size: 1.5rem;
  cursor: pointer;
}
.botao-passo:active { background: var(--verde-claro); transform: scale(.95); }

.interruptor-linha {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 3.6rem;
  padding: .5rem .9rem;
  border-radius: 20px;
  background: #F7F3EA;
  font-weight: 700;
  cursor: pointer;
}
.interruptor {
  appearance: none; -webkit-appearance: none;
  position: relative; flex: none;
  width: 3.6rem; height: 2.1rem;
  margin: 0;
  border-radius: 999px;
  background: #C9C1AE;
  cursor: pointer;
  transition: background-color .2s ease;
}
.interruptor::after {
  content: "";
  position: absolute; top: .2rem; left: .2rem;
  width: 1.7rem; height: 1.7rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
  transition: transform .2s ease;
}
.interruptor:checked { background: var(--verde); }
.interruptor:checked::after { transform: translateX(1.5rem); }

.folha-acoes { display: grid; gap: .4rem; }
.confirmar-texto { font-family: var(--fonte-titulo); font-size: 1.4rem; line-height: 1.25; text-align: center; padding: .5rem 0; }

/* ---------- Aviso rápido ---------- */

.aviso-rapido {
  position: fixed;
  left: 50%;
  bottom: calc(var(--altura-abas) + env(safe-area-inset-bottom) + 14px);
  z-index: 30;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: .75rem;
  width: min(32rem, calc(100% - 28px));
  padding: .85rem .9rem .85rem 1.1rem;
  border-radius: 18px;
  background: #1C271F;
  color: #fff;
  font-size: .95rem;
  line-height: 1.35;
  box-shadow: var(--sombra-forte);
  animation: entrar .25s ease-out;
}
.aviso-rapido span { flex: 1; }
.aviso-rapido-acao {
  flex: none;
  min-height: 2.8rem;
  padding: .3rem .9rem;
  border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, .14);
  color: #FFE08A;
  font-weight: 700;
  cursor: pointer;
}

@media (min-width: 760px) {
  .grade-plantas { grid-template-columns: repeat(3, 1fr); }
  .tela-plantas, .tela-lembretes, .botao-guardar, .bloco-lembrar { max-width: 40rem; margin-left: auto; margin-right: auto; }
  .botao-guardar { display: flex; }
}

/* Telas largas: a barra de abas vira uma barra flutuante centralizada */
@media (min-width: 760px) {
  .abas {
    left: 50%; right: auto;
    width: min(560px, calc(100% - 32px));
    bottom: 14px;
    transform: translateX(-50%);
    padding: 8px;
    border: 1px solid var(--linha);
    border-radius: 24px;
  }
  body { padding-bottom: calc(var(--altura-abas) + 40px); }
  .aviso-rapido { bottom: calc(var(--altura-abas) + 34px); }
}
