@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&display=swap");

:root {
  --fondo: #f6f0de; --papel: #fffbef; --tinta: #1d1b18; --suave: #857d6c; --linea: #e8dfc8;
  --rosa: #ec6a84; --rosa-s: #fbdbe1;
  --verde: #3f8f7f; --verde-o: #2f6f62; --verde-s: #d6ebe4;
  --mostaza: #f4b43f; --mostaza-s: #fcebc4;
  --naranja: #f28c4e; --naranja-s: #fde0cc;
  --lavanda: #8e90ec; --lavanda-s: #e3e3fb;
  --r: 30px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fondo); color: var(--tinta); font-family: "Outfit", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
main { max-width: 480px; margin: 0 auto; padding: 20px 16px 130px; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; cursor: pointer; }
.ico { display: inline-flex; line-height: 0; }
.oculto { display: none !important; }

/* ---------- tipografía ---------- */
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; }
.titular { font-size: 2.3rem; font-weight: 800; line-height: 1.02; margin: 4px 0 18px; }
.subtitulo { color: var(--suave); font-weight: 500; margin: -10px 0 20px; }
.etiqueta { font-size: .8rem; font-weight: 600; color: var(--suave); }
.enorme { font-size: 3.6rem; font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
p.ayuda { color: var(--suave); margin: 0 0 14px; line-height: 1.45; font-weight: 500; }

/* ---------- cabecera ---------- */
.cabecera { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.cabecera .hola { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.cabecera .fecha { color: var(--suave); font-size: .88rem; font-weight: 500; margin-top: 2px; }
.boton-redondo { width: 48px; height: 48px; border-radius: 50%; border: none; background: var(--papel); display: grid; place-items: center; box-shadow: 0 0 0 1.5px var(--linea) inset; }
.volver { display: inline-flex; align-items: center; gap: 4px; border: none; background: var(--papel); border-radius: 999px; padding: 8px 14px 8px 8px; font-weight: 600; margin-bottom: 16px; box-shadow: 0 0 0 1.5px var(--linea) inset; }

/* ---------- tarjetas ---------- */
.tarjeta { background: var(--papel); border-radius: var(--r); padding: 22px; margin-bottom: 14px; position: relative; overflow: hidden; }
.tarjeta h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 4px; }
.tarjeta.verde { background: var(--verde); color: #fff; }
.tarjeta.rosa { background: var(--rosa); color: #fff; }
.tarjeta.oscura { background: var(--tinta); color: #fff; }
.tarjeta.oscura p.ayuda, .tarjeta.verde p.ayuda, .tarjeta.rosa p.ayuda { color: #ffffffb8; }
.rayas::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .09;
  background: repeating-linear-gradient(-45deg, #fff 0 10px, transparent 10px 22px); }
.burbuja { position: absolute; border-radius: 50%; pointer-events: none; }
.tarjeta > *:not(.burbuja) { position: relative; }

/* ---------- inicio ---------- */
.hero .enorme { margin: 14px 0 4px; }
.hero .barra { background: #ffffff33; }
.hero .barra div { background: var(--mostaza); }
.fichas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.ficha { border-radius: 24px; padding: 14px 12px; }
.ficha .circ { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #ffffffaa; margin-bottom: 10px; }
.ficha .num { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.ficha .etiqueta { color: #1d1b18aa; margin-top: 4px; }
.accion { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.accion h2 { font-size: 1.5rem; }
.flecha-circ { width: 56px; height: 56px; flex: none; border-radius: 50%; border: none; display: grid; place-items: center; background: var(--papel); color: var(--tinta); }
.tarjeta.oscura .flecha-circ { background: var(--mostaza); }
.chips-mini { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip-mini { background: var(--fondo); border-radius: 999px; padding: 6px 12px; font-size: .88rem; font-weight: 600; }
.fila-perfil { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1.5px dashed var(--linea); }
.fila-perfil:first-of-type { border-top: none; padding-top: 4px; }
.fila-perfil .circ { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.fila-perfil .valor { font-weight: 600; margin-top: 2px; }

/* ---------- formularios ---------- */
label.titulo { display: block; font-weight: 800; font-size: 1.1rem; margin-bottom: 12px; letter-spacing: -0.02em; }
input[type=text], input[type=number], textarea { width: 100%; font: inherit; font-weight: 500; color: inherit; background: var(--fondo); border: 2px solid transparent; border-radius: 18px; padding: 14px 16px; outline: none; }
input:focus, textarea:focus { border-color: var(--tinta); }
textarea { min-height: 90px; resize: vertical; }
.fila { display: flex; gap: 8px; margin-bottom: 12px; }
.fila input { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: none; background: var(--fondo); border-radius: 999px; padding: 10px 16px; font-weight: 600; }
.chip[aria-pressed=true] { background: var(--tinta); color: #fff; }
.chip.quitar { background: var(--rosa-s); display: inline-flex; align-items: center; gap: 6px; }
.dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dia-b { aspect-ratio: 1; border-radius: 50%; border: none; background: var(--fondo); font-weight: 800; font-size: 1.05rem; }
.dia-b[aria-pressed=true] { background: var(--naranja); color: #fff; }
.segmento { display: flex; background: var(--fondo); border-radius: 999px; padding: 5px; }
.segmento button { flex: 1; white-space: nowrap; border: none; background: none; border-radius: 999px; padding: 12px 10px; font-weight: 600; color: var(--suave); }
.segmento button[aria-pressed=true] { background: var(--tinta); color: #fff; }
.paso-num { display: flex; align-items: center; gap: 10px; }
.paso-num .cifra { display: flex; align-items: baseline; flex: 1; min-width: 0; }
.paso-num input { border: none; background: none; padding: 0; font-size: 3.6rem; font-weight: 800; letter-spacing: -0.05em; width: 2.2ch; min-width: 0; border-radius: 0; }
.paso-num input:focus { border: none; }
.paso-num .moneda { font-size: 2rem; font-weight: 800; }
.redondo { width: 52px; height: 52px; flex: none; border-radius: 50%; border: none; background: var(--fondo); display: grid; place-items: center; }

button.grande { width: 100%; border: none; border-radius: 999px; background: var(--tinta); color: #fff; font-weight: 700; font-size: 1.1rem; padding: 8px 8px 8px 26px; display: flex; align-items: center; justify-content: space-between; min-height: 66px; }
button.grande .flecha-circ { width: 50px; height: 50px; background: var(--mostaza); }
button.grande:disabled { opacity: .5; }
button.pildora { border: none; border-radius: 999px; background: var(--fondo); padding: 12px 18px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }

/* ---------- avisos ---------- */
.aviso { display: none; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: 22px; margin-bottom: 14px; font-weight: 500; line-height: 1.4; }
.aviso.error { display: flex; background: var(--rosa-s); color: #8a2b3d; }
.aviso.ok { display: flex; background: var(--verde-s); color: var(--verde-o); }
.aviso.atencion { display: flex; background: var(--mostaza-s); color: #6e4b00; }

/* ---------- cargando ---------- */
.cargando { text-align: center; padding: 90px 10px; }
.puntos { display: flex; justify-content: center; gap: 12px; margin-bottom: 28px; }
.puntos span { width: 22px; height: 22px; border-radius: 50%; animation: saltar 1s ease-in-out infinite; }
.puntos span:nth-child(1) { background: var(--rosa); }
.puntos span:nth-child(2) { background: var(--mostaza); animation-delay: .15s; }
.puntos span:nth-child(3) { background: var(--verde); animation-delay: .3s; }
@keyframes saltar { 50% { transform: translateY(-18px); } }
.cargando h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }

/* ---------- menú ---------- */
.batch ol { counter-reset: n; list-style: none; padding: 0; margin: 16px 0 0; }
.batch li { counter-increment: n; display: flex; gap: 12px; margin-bottom: 12px; line-height: 1.4; font-weight: 500; }
.batch li::before { content: counter(n); flex: none; width: 28px; height: 28px; border-radius: 50%; background: #ffffff24; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.cab-icono { display: flex; align-items: center; gap: 12px; }
.cab-icono .circ { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; }

.receta { border-radius: var(--r); margin-bottom: 14px; background: var(--c); overflow: hidden; }
.receta summary { list-style: none; padding: 20px 20px 22px; display: flex; gap: 14px; align-items: flex-end; justify-content: space-between; cursor: pointer; }
.receta summary::-webkit-details-marker { display: none; }
.receta .dia { display: inline-block; background: #ffffffb3; border-radius: 999px; padding: 5px 12px; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.receta h3 { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.receta .meta { display: flex; gap: 6px; margin-top: 12px; }
.receta .meta span { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; background: #ffffff80; border-radius: 999px; padding: 5px 10px; font-size: .85rem; font-weight: 600; }
.receta .abrir { width: 50px; height: 50px; flex: none; border-radius: 50%; background: var(--tinta); color: #fff; display: grid; place-items: center; transition: transform .2s; }
.receta[open] .abrir { transform: rotate(180deg); }
.receta .dentro { background: var(--papel); margin: 0 8px 8px; border-radius: 24px; padding: 20px; }
.receta h4 { margin: 0 0 10px; font-size: 1.05rem; font-weight: 800; }
.ingr { list-style: none; padding: 0; margin: 0 0 18px; }
.ingr li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1.5px dashed var(--linea); font-weight: 500; }
.ingr li:first-child { border-top: none; }
.ingr li b { font-weight: 700; white-space: nowrap; }
.ingr li small { display: block; color: var(--suave); font-size: .85rem; }
.pasos { counter-reset: p; list-style: none; padding: 0; margin: 0 0 16px; }
.pasos li { counter-increment: p; display: flex; gap: 12px; margin-bottom: 12px; line-height: 1.45; font-weight: 500; }
.pasos li::before { content: counter(p); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.conserva { display: flex; gap: 10px; align-items: flex-start; background: var(--fondo); border-radius: 18px; padding: 12px 14px; color: var(--suave); font-weight: 500; margin-bottom: 14px; }

/* ---------- lista ---------- */
.barra { height: 14px; background: var(--fondo); border-radius: 99px; overflow: hidden; margin-top: 16px; }
.barra div { height: 100%; background: var(--verde); border-radius: 99px; }
.barra.pasado div { background: var(--rosa); }
.seccion-lista h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--suave); margin: 20px 0 6px; font-weight: 700; }
.seccion-lista h3:first-child { margin-top: 0; }
.item { display: flex; gap: 12px; align-items: center; padding: 10px 0; cursor: pointer; }
.item input { position: absolute; opacity: 0; pointer-events: none; }
.item .marca { width: 28px; height: 28px; flex: none; border-radius: 50%; box-shadow: 0 0 0 2px var(--linea) inset; display: grid; place-items: center; color: transparent; }
.item.tachado .marca { background: var(--verde); box-shadow: none; color: #fff; }
.item img { width: 50px; height: 50px; border-radius: 16px; object-fit: cover; background: #fff; flex: none; }
.item .txt { flex: 1; min-width: 0; }
.item .nom { font-weight: 700; line-height: 1.2; }
.item .det { color: var(--suave); font-size: .85rem; font-weight: 500; margin-top: 2px; }
.item .pre { font-weight: 800; white-space: nowrap; }
.item.tachado .nom, .item.tachado .pre { text-decoration: line-through; opacity: .4; }
.item.tachado img { opacity: .35; }

/* ---------- navegación ---------- */
nav.abajo { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); width: min(440px, calc(100% - 32px));
  background: var(--tinta); border-radius: 999px; padding: 8px; display: flex; justify-content: space-between; box-shadow: 0 12px 30px #1d1b1833; z-index: 10; }
nav.abajo button { width: 56px; height: 56px; border-radius: 50%; border: none; background: none; color: #fff9; display: grid; place-items: center; }
nav.abajo button[aria-current=true] { background: var(--mostaza); color: var(--tinta); }
nav.abajo button:disabled { opacity: .3; }

.hero .borrar { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; border: none; background: #ffffff26; color: #fff; display: grid; place-items: center; z-index: 1; }
.confirmar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #00000026; border-radius: 22px; padding: 14px; margin-bottom: 14px; font-weight: 600; }
.confirmar span { width: 100%; margin: 0 0 4px 4px; }
.confirmar .pildora { padding: 8px 14px; color: var(--tinta); }

.antes { padding-left: 20px; margin: 0 0 18px; line-height: 1.5; font-weight: 500; }
.antes li { margin-bottom: 4px; }
.min-paso { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; background: var(--fondo); border-radius: 999px; padding: 2px 8px; font-size: .78rem; font-weight: 700; color: var(--suave); vertical-align: 1px; white-space: nowrap; }
.trucos { background: var(--mostaza-s); border-radius: 18px; padding: 14px 16px; margin-bottom: 14px; }
.trucos ul { padding-left: 18px; margin: 0; line-height: 1.5; font-weight: 500; }
.trucos li { margin-bottom: 6px; }
.cargando-pasos { display: flex; align-items: center; gap: 14px; background: var(--fondo); border-radius: 18px; padding: 16px; margin-bottom: 16px; color: var(--suave); font-weight: 600; }
.puntos.mini { margin: 0; gap: 6px; }
.puntos.mini span { width: 10px; height: 10px; }

.chip-mini.oscuro { background: #ffffff1f; color: #fff; }
.grande-min { font-size: .85rem; padding: 6px 10px; margin: 0; }
.para { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.para-plato { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 700; }
.nota-cerrar { display: inline-block; margin-top: 18px; background: var(--verde-s); color: var(--verde-o); border-radius: 18px; padding: 12px 16px; font-weight: 600; line-height: 1.4; }
