/* Bocado · Sácale una foto. Nosotros hacemos las cuentas. */
:root {
  --tomate: #F2542D;
  --tomate-osc: #D63E18;
  --albahaca: #1F7A5A;
  --grafito: #1B1B1F;
  --blanco-roto: #FBFBF8;
  --maiz: #F5B82E;
  --uva: #6C5CE7;

  --principal: var(--tomate);
  --principal-osc: var(--tomate-osc);
  --principal-texto: #FFFFFF;
  --bien-color: var(--albahaca);

  --fondo: var(--blanco-roto);
  --superficie: #FFFFFF;
  --superficie-2: #F2F1EC;
  --texto: var(--grafito);
  --texto-suave: #5E5D66;
  --borde: #E5E3DC;
  --sombra: 0 1px 2px rgba(27, 27, 31, .05), 0 8px 24px rgba(27, 27, 31, .07);
  --prot: #1F7A5A;
  --carb: #F5B82E;
  --gras: #6C5CE7;
  --mal: #C9302C;
  --radio: 22px;
  --radio-sm: 14px;
  --fuente: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --fondo: #121214; --superficie: #1C1C20; --superficie-2: #26262B; --texto: #F3F2EE; --texto-suave: #A9A8B0; --borde: #33333A;
    --sombra: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35); --prot: #3DB389; color-scheme: dark;
  }
}
:root[data-tema="oscuro"] {
  --fondo: #121214; --superficie: #1C1C20; --superficie-2: #26262B; --texto: #F3F2EE; --texto-suave: #A9A8B0; --borde: #33333A;
  --sombra: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35); --prot: #3DB389; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--fondo); color: var(--texto); font-family: var(--fuente); font-size: 16.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 .45em; font-weight: 800; }
p { margin: 0 0 .8em; }
[hidden] { display: none !important; }
.oculto-accesible { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--maiz); outline-offset: 2px; }
button { font: inherit; color: inherit; }

/* ---------- Cabecera ---------- */
.cabecera { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; max-width: 1080px; margin: 0 auto; }
.marca { display: inline-flex; align-items: center; gap: 9px; font-weight: 900; font-size: 1.3rem; letter-spacing: -0.04em; text-decoration: none; }
.marca img { width: 30px; height: 30px; }
.cabecera nav { display: flex; align-items: center; gap: 8px; }
.selector-idioma { border: 1px solid var(--borde); background: var(--superficie); color: var(--texto); border-radius: 999px; padding: 6px 8px; font: inherit; font-size: .85rem; font-weight: 700; width: auto; min-height: 0; }

/* ---------- Botones y campos ---------- */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 800; font-size: 1rem; background: var(--principal); color: var(--principal-texto); text-decoration: none; cursor: pointer; transition: transform .08s, background .15s; min-height: 46px; white-space: nowrap; }
.boton:hover { background: var(--principal-osc); }
.boton:active { transform: scale(.98); }
.boton:disabled { opacity: .55; cursor: default; transform: none; }
.boton.secundario { background: var(--superficie-2); color: var(--texto); }
.boton.secundario:hover { background: var(--borde); }
.boton.verde { background: var(--albahaca); color: #fff; }
.boton.borde { background: transparent; border: 2px solid var(--borde); color: var(--texto); }
.boton.peque { padding: 8px 14px; font-size: .9rem; min-height: 38px; }
.boton.grande { padding: 16px 26px; font-size: 1.08rem; min-height: 56px; }
.boton.ancho { width: 100%; }
.boton.peligro { background: var(--mal); color: #fff; }
.boton-icono { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--superficie-2); cursor: pointer; font-size: 1.1rem; flex: none; }
.boton-icono:hover { background: var(--borde); }
.enlace { background: none; border: 0; padding: 0; color: var(--principal); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.campo label, .etiqueta-campo { font-weight: 700; font-size: .95rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], input[type="search"], input[type="date"], select, textarea {
  font: inherit; color: var(--texto); background: var(--superficie); border: 1.5px solid var(--borde); border-radius: var(--radio-sm); padding: 12px 14px; width: 100%; min-height: 48px;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--principal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--principal) 22%, transparent); }
.ayuda { color: var(--texto-suave); font-size: .9rem; }
.fila { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fila.separar { justify-content: space-between; }
.crece { flex: 1; min-width: 0; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.tarjeta { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: 18px; box-shadow: var(--sombra); }
.etiqueta { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; background: var(--superficie-2); color: var(--texto-suave); white-space: nowrap; }
.etiqueta.pro { background: linear-gradient(135deg, var(--tomate), var(--maiz)); color: #fff; }
.etiqueta.verde { background: color-mix(in srgb, var(--albahaca) 15%, transparent); color: var(--prot); }

.opciones { display: grid; gap: 10px; }
.opciones.par { grid-template-columns: 1fr 1fr; }
.opcion { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; padding: 16px; border-radius: var(--radio-sm); border: 2px solid var(--borde); background: var(--superficie); cursor: pointer; font: inherit; color: inherit; }
.opcion:hover { border-color: color-mix(in srgb, var(--principal) 45%, var(--borde)); }
.opcion[aria-pressed="true"] { border-color: var(--principal); background: color-mix(in srgb, var(--principal) 7%, var(--superficie)); }
.opcion .emoji { font-size: 1.6rem; flex: none; }
.opcion b { display: block; }
.opcion small { color: var(--texto-suave); }

/* ---------- Avisos ---------- */
.avisos { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; z-index: 300; width: min(92vw, 420px); pointer-events: none; }
.aviso { background: var(--grafito); color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--sombra); font-weight: 600; animation: aparecer .2s ease-out; }
.aviso.ok { background: var(--albahaca); }
.aviso.error { background: var(--mal); }
@keyframes aparecer { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Portada ---------- */
.portada { max-width: 1080px; margin: 0 auto; padding: 8px 16px 40px; }
.heroe { display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center; padding: 28px 0 40px; }
.heroe h1 { font-size: clamp(2.3rem, 6vw, 4rem); }
.heroe h1 em { font-style: normal; color: var(--principal); }
.heroe .sub { font-size: 1.15rem; color: var(--texto-suave); max-width: 34ch; }
.sellos-confianza { display: flex; gap: 14px; flex-wrap: wrap; color: var(--texto-suave); font-size: .9rem; margin-top: 14px; }
.demo { position: relative; justify-self: center; width: min(100%, 360px); }
.demo-foto { aspect-ratio: 4 / 5; border-radius: 32px; overflow: hidden; background: radial-gradient(circle at 50% 55%, #fff 0 34%, #EDE6DA 35% 37%, #F7EFE3 38% 100%); position: relative; box-shadow: var(--sombra); }
.demo-plato { position: absolute; inset: 14% 10%; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #FFFDF8 0 60%, #EFE7DA 61% 100%); }
.demo-pieza { position: absolute; border-radius: 45% 55% 50% 50%; }
.demo-arroz { left: 22%; top: 28%; width: 30%; height: 26%; background: radial-gradient(circle at 30% 30%, #fff, #F1ECDF); }
.demo-pollo { left: 46%; top: 40%; width: 32%; height: 22%; background: linear-gradient(135deg, #E0A35F, #B9733A); border-radius: 40% 60% 45% 55%; }
.demo-palta { left: 26%; top: 56%; width: 24%; height: 15%; background: linear-gradient(135deg, #B7D36B, #6E9A2F); border-radius: 60% 40% 55% 45%; }
.demo-tomate { left: 55%; top: 26%; width: 13%; height: 11%; background: radial-gradient(circle at 35% 35%, #FF8A70, #D8341B); border-radius: 50%; }
.demo-chip { position: absolute; background: var(--superficie); color: var(--texto); border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: .82rem; box-shadow: var(--sombra); opacity: 0; animation: chip 6s infinite; white-space: nowrap; }
.demo-chip:nth-of-type(2) { animation-delay: .5s; }
.demo-chip:nth-of-type(3) { animation-delay: 1s; }
.demo-chip:nth-of-type(4) { animation-delay: 1.5s; }
@keyframes chip { 0%, 8% { opacity: 0; transform: translateY(6px) scale(.95); } 14%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.demo-resumen { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); width: 88%; background: var(--superficie); border-radius: 20px; padding: 14px 16px; box-shadow: var(--sombra); display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; border: 1px solid var(--borde); }
.demo-resumen .kcal { font-size: 1.9rem; font-weight: 900; letter-spacing: -.04em; grid-row: span 2; }
.demo-resumen .kcal small { font-size: .8rem; font-weight: 700; color: var(--texto-suave); display: block; letter-spacing: 0; }
.macros-mini { display: flex; gap: 10px; font-size: .85rem; font-weight: 700; color: var(--texto-suave); flex-wrap: wrap; }
.punto { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; }
.punto.prot { background: var(--prot); } .punto.carb { background: var(--carb); } .punto.gras { background: var(--gras); }

.seccion { padding: 44px 0 10px; }
.seccion > h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); text-align: center; }
.seccion > .ayuda { text-align: center; max-width: 52ch; margin: 0 auto 22px; font-size: 1.02rem; }
.pasos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: paso; }
.paso { counter-increment: paso; }
.paso::before { content: counter(paso); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--principal); color: #fff; font-weight: 900; margin-bottom: 10px; }
.rejilla { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rejilla .tarjeta h3 { font-size: 1.1rem; }
.rejilla .tarjeta .emoji { font-size: 1.7rem; display: block; margin-bottom: 6px; }
.comparar { width: 100%; border-collapse: collapse; background: var(--superficie); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); }
.comparar th, .comparar td { padding: 12px 14px; border-bottom: 1px solid var(--borde); text-align: left; vertical-align: top; }
.comparar th { background: var(--superficie-2); font-size: .9rem; }
.precios { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 760px; margin: 0 auto; }
.precio { font-size: 2.2rem; font-weight: 900; letter-spacing: -.04em; }
.precios ul { padding-left: 1.1em; margin: 10px 0 16px; }
.precios li { margin-bottom: 4px; }
.destacada { border: 2.5px solid var(--principal); }
.preguntas details { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio-sm); padding: 14px 16px; margin-bottom: 10px; }
.preguntas summary { cursor: pointer; font-weight: 800; }
.preguntas details p { margin: 10px 0 0; color: var(--texto-suave); }
.pie { max-width: 1080px; margin: 30px auto 0; padding: 26px 16px 40px; color: var(--texto-suave); font-size: .9rem; border-top: 1px solid var(--borde); display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.llamada { text-align: center; background: var(--grafito); color: #fff; border-radius: 32px; padding: 34px 20px; margin-top: 40px; }
.llamada h2 { color: #fff; }

/* ---------- Alta (empezar) ---------- */
.alta { max-width: 520px; margin: 0 auto; padding: 0 16px 60px; }
.progreso-alta { height: 6px; background: var(--superficie-2); border-radius: 99px; overflow: hidden; margin: 4px 0 22px; }
.progreso-alta span { display: block; height: 100%; background: var(--principal); border-radius: 99px; transition: width .3s; }
.paso-alta h1 { font-size: 1.75rem; }
.meta-grande { text-align: center; padding: 18px 0 8px; }
.meta-grande .numero { font-size: 3.6rem; font-weight: 900; letter-spacing: -.05em; line-height: 1; }
.meta-grande .numero small { font-size: 1rem; font-weight: 700; color: var(--texto-suave); letter-spacing: 0; }
.macros-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.macros-meta div { background: var(--superficie-2); border-radius: var(--radio-sm); padding: 10px; text-align: center; }
.macros-meta b { display: block; font-size: 1.25rem; }
.unidades { display: flex; gap: 8px; align-items: center; }
.unidades input { flex: 1; }
.unidades span { font-weight: 700; color: var(--texto-suave); min-width: 28px; }

/* ---------- App ---------- */
.app { max-width: 600px; margin: 0 auto; padding: 0 14px calc(110px + env(safe-area-inset-bottom)); }
.app-cabecera { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0 8px; position: sticky; top: 0; background: color-mix(in srgb, var(--fondo) 92%, transparent); backdrop-filter: blur(8px); z-index: 20; }
.selector-dia { display: flex; align-items: center; gap: 6px; }
.selector-dia b { min-width: 9.5em; text-align: center; font-size: 1.02rem; }
.vista { display: none; }
.vista.activa { display: block; animation: aparecer .18s ease-out; }

.resumen-dia { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
.anillo { position: relative; width: 150px; height: 150px; }
.anillo svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anillo .fondo-anillo { stroke: var(--superficie-2); }
.anillo .valor-anillo { stroke: var(--principal); transition: stroke-dashoffset .5s ease; stroke-linecap: round; }
.anillo.pasado .valor-anillo { stroke: var(--maiz); }
.anillo .centro { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.anillo .centro b { font-size: 2rem; font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.anillo .centro small { color: var(--texto-suave); font-weight: 700; font-size: .8rem; }
.barras { display: grid; gap: 10px; }
.barra-macro .fila-macro { display: flex; justify-content: space-between; font-size: .88rem; font-weight: 700; }
.barra-macro .fila-macro span:last-child { color: var(--texto-suave); font-weight: 600; }
.pista { height: 9px; background: var(--superficie-2); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.pista span { display: block; height: 100%; border-radius: 99px; transition: width .5s ease; }
.pista .prot { background: var(--prot); } .pista .carb { background: var(--carb); } .pista .gras { background: var(--gras); }

.momento { margin-top: 14px; }
.momento-cab { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 6px; }
.momento-cab h3 { font-size: 1.02rem; margin: 0; }
.momento-cab span { color: var(--texto-suave); font-weight: 700; font-size: .9rem; }
.lista-comidas { display: grid; gap: 8px; }
.comida { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radio-sm); background: var(--superficie); border: 1px solid var(--borde); cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit; }
.comida:hover { border-color: color-mix(in srgb, var(--principal) 35%, var(--borde)); }
.comida .mini { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--superficie-2); display: grid; place-items: center; font-size: 1.5rem; flex: none; }
.comida .info { flex: 1; min-width: 0; }
.comida .info b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comida .info small { color: var(--texto-suave); }
.comida .kcal { font-weight: 900; white-space: nowrap; }
.anadir-momento { border: 1.5px dashed var(--borde); background: transparent; color: var(--texto-suave); border-radius: var(--radio-sm); padding: 10px; font-weight: 700; cursor: pointer; width: 100%; }
.anadir-momento:hover { border-color: var(--principal); color: var(--principal); }

.vasos { display: flex; gap: 6px; flex-wrap: wrap; }
.vaso { width: 34px; height: 42px; border: 2px solid color-mix(in srgb, #2F8FE0 55%, var(--borde)); border-radius: 4px 4px 10px 10px; background: transparent; cursor: pointer; position: relative; overflow: hidden; padding: 0; }
.vaso.lleno::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 75%; background: #4BA3F0; }
.peso-rapido { display: flex; gap: 8px; align-items: center; }
.peso-rapido input { max-width: 120px; }

.navegacion { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: color-mix(in srgb, var(--superficie) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--borde); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.navegacion .dentro { max-width: 600px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; }
.navegacion button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: .74rem; font-weight: 700; color: var(--texto-suave); cursor: pointer; }
.navegacion button .ico { font-size: 1.35rem; line-height: 1; }
.navegacion button[aria-current="page"] { color: var(--principal); }
.navegacion .mas { justify-self: center; width: 62px; height: 62px; border-radius: 50%; background: var(--principal); color: #fff; font-size: 2rem; font-weight: 400; display: grid; place-items: center; margin-top: -26px; box-shadow: 0 8px 22px color-mix(in srgb, var(--tomate) 45%, transparent); border: 4px solid var(--fondo); padding: 0; }
.navegacion .mas:hover { background: var(--principal-osc); }

/* Hojas (paneles que suben desde abajo) */
dialog.hoja { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 600px; max-height: 92vh; border-radius: 26px 26px 0 0; background: var(--fondo); color: var(--texto); box-shadow: 0 -10px 40px rgba(0,0,0,.2); }
dialog.hoja::backdrop { background: rgba(10, 10, 12, .45); }
dialog.hoja[open] { animation: subir .22s ease-out; }
@keyframes subir { from { transform: translateY(40px); opacity: .4; } }
.hoja-dentro { padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto; max-height: 92vh; }
.hoja-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: -10px; background: var(--fondo); padding: 10px 0; z-index: 2; }
.hoja-cab h2 { font-size: 1.3rem; margin: 0; }
.tirador { width: 44px; height: 5px; border-radius: 99px; background: var(--borde); margin: 4px auto 2px; }
@media (min-width: 700px) {
  dialog.hoja { margin: auto; border-radius: 26px; }
}

.formas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.forma { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border-radius: var(--radio); background: var(--superficie); border: 1px solid var(--borde); box-shadow: var(--sombra); cursor: pointer; text-align: left; font: inherit; color: inherit; position: relative; }
.forma:hover { border-color: var(--principal); }
.forma .ico { font-size: 1.7rem; }
.forma b { font-size: 1rem; }
.forma small { color: var(--texto-suave); font-size: .82rem; line-height: 1.3; }
.forma.principal { grid-column: span 2; flex-direction: row; align-items: center; gap: 14px; background: var(--principal); color: #fff; border: 0; }
.forma.principal small { color: rgba(255,255,255,.85); }
.forma .etiqueta { position: absolute; top: 10px; right: 10px; }

.revisar-foto { width: 100%; max-height: 240px; object-fit: cover; border-radius: var(--radio); margin-bottom: 12px; }
.alimento-edit { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px; border-radius: var(--radio-sm); background: var(--superficie); border: 1px solid var(--borde); margin-bottom: 8px; }
.alimento-edit .nombre-al { font-weight: 800; border: 0; padding: 0; min-height: 0; background: transparent; border-radius: 6px; }
.alimento-edit .nombre-al:focus { box-shadow: none; outline: 2px solid var(--borde); outline-offset: 2px; }
.alimento-edit .datos-al { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .86rem; color: var(--texto-suave); }
.porcion-ctrl { display: flex; align-items: center; gap: 4px; }
.porcion-ctrl button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--borde); background: var(--superficie-2); cursor: pointer; font-weight: 800; }
.porcion-ctrl input { width: 76px; min-height: 34px; padding: 4px 8px; text-align: center; }
.porcion-rapida { display: flex; gap: 4px; }
.porcion-rapida button { border: 1px solid var(--borde); background: transparent; border-radius: 99px; padding: 3px 9px; font-size: .78rem; font-weight: 800; cursor: pointer; color: var(--texto-suave); }
.porcion-rapida button:hover { border-color: var(--principal); color: var(--principal); }
.quitar { background: none; border: 0; color: var(--texto-suave); font-size: 1.15rem; cursor: pointer; padding: 2px 6px; }
.totales-revisar { position: sticky; bottom: -20px; background: var(--fondo); padding: 12px 0 4px; border-top: 1px solid var(--borde); margin-top: 8px; }
.confianza { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radio-sm); background: var(--superficie-2); font-size: .9rem; margin-bottom: 12px; }

.cargando { display: grid; place-items: center; gap: 12px; padding: 40px 10px; text-align: center; color: var(--texto-suave); }
.giro { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--superficie-2); border-top-color: var(--principal); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

.resultado-busqueda { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; border: 1px solid var(--borde); border-radius: var(--radio-sm); background: var(--superficie); margin-bottom: 6px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.resultado-busqueda:hover { border-color: var(--principal); }
.resultado-busqueda small { color: var(--texto-suave); }

.escaner { position: relative; border-radius: var(--radio); overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.escaner video { width: 100%; height: 100%; object-fit: cover; }
.escaner .marco { position: absolute; left: 12%; right: 12%; top: 34%; bottom: 34%; border: 3px solid rgba(255,255,255,.9); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.producto { display: flex; gap: 14px; align-items: center; }
.producto img { width: 74px; height: 74px; object-fit: contain; background: #fff; border-radius: 12px; }
.sellos-alto { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.sello-alto { width: 74px; height: 74px; background: #111; color: #fff; display: grid; place-content: center; text-align: center; font-weight: 900; font-size: .64rem; line-height: 1.1; clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); padding: 6px; text-transform: uppercase; }
.sello-alto small { font-size: .5rem; font-weight: 700; display: block; margin-top: 3px; }
.sin-sellos { color: var(--prot); font-weight: 800; }

/* Progreso */
.grafico { width: 100%; height: 190px; }
.grafico .meta-linea { stroke: var(--texto-suave); stroke-dasharray: 4 4; }
.grafico .barra-dia { fill: var(--principal); }
.grafico .barra-dia.pasado { fill: var(--maiz); }
.grafico .barra-dia.vacio { fill: var(--superficie-2); }
.grafico text { fill: var(--texto-suave); font-size: 11px; font-family: var(--fuente); }
.grafico .linea-peso { fill: none; stroke: var(--albahaca); stroke-width: 2.5; }
.grafico .punto-peso { fill: var(--albahaca); }
.cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cifra { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio-sm); padding: 12px; text-align: center; }
.cifra b { display: block; font-size: 1.45rem; letter-spacing: -.03em; }
.cifra small { color: var(--texto-suave); font-weight: 700; font-size: .78rem; }
.pestanas { display: inline-flex; gap: 4px; background: var(--superficie-2); border-radius: 99px; padding: 4px; }
.pestanas button { border: 0; background: transparent; border-radius: 99px; padding: 7px 14px; font-weight: 800; cursor: pointer; color: var(--texto-suave); }
.pestanas button[aria-pressed="true"] { background: var(--superficie); color: var(--texto); box-shadow: var(--sombra); }

/* Coach */
.chat { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.burbuja { max-width: 86%; padding: 11px 14px; border-radius: 18px; white-space: pre-wrap; word-wrap: break-word; }
.burbuja.yo { align-self: flex-end; background: var(--principal); color: #fff; border-bottom-right-radius: 6px; }
.burbuja.coach { align-self: flex-start; background: var(--superficie); border: 1px solid var(--borde); border-bottom-left-radius: 6px; }
.burbuja.coach strong { font-weight: 800; }
.sugerencias { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.sugerencias button { flex: none; border: 1px solid var(--borde); background: var(--superficie); border-radius: 99px; padding: 8px 14px; cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--texto); }
.escribir-coach { position: fixed; left: 0; right: 0; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 40; padding: 8px 14px; }
.escribir-coach form { max-width: 600px; margin: 0 auto; display: flex; gap: 8px; background: var(--superficie); border: 1px solid var(--borde); border-radius: 999px; padding: 6px; box-shadow: var(--sombra); }
.escribir-coach input { border: 0; min-height: 42px; background: transparent; }
.escribir-coach input:focus { box-shadow: none; }
.escribir-coach .boton { min-height: 42px; padding: 8px 16px; }
.vista-coach-relleno { height: 70px; }

.bloque-pro { background: linear-gradient(135deg, color-mix(in srgb, var(--tomate) 12%, var(--superficie)), color-mix(in srgb, var(--maiz) 14%, var(--superficie))); border: 1px solid color-mix(in srgb, var(--tomate) 30%, var(--borde)); }
/* Apps de Google Play y App Store: ahí no se vende el Pro (se compra solo en la web). */
.app-tienda [data-solo-web] { display: none !important; }
/* Funciones Pro: dentro de las apps solo se ven si la cuenta ya es Pro. */
.app-tienda:not(.cuenta-pro) [data-solo-pro] { display: none !important; }
.lista-simple { list-style: none; padding: 0; margin: 0; }
.lista-simple li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--borde); flex-wrap: wrap; }
.lista-simple li:last-child { border-bottom: 0; }

.casilla { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.casilla input { width: 20px; height: 20px; }
.aviso-salud { font-size: .82rem; color: var(--texto-suave); text-align: center; margin: 22px 0 0; }

@media (max-width: 860px) {
  .heroe { grid-template-columns: 1fr; text-align: center; padding-top: 10px; }
  .heroe .sub { margin: 0 auto 14px; }
  .heroe .fila, .sellos-confianza { justify-content: center; }
  .demo { margin-bottom: 30px; }
  .pasos, .rejilla { grid-template-columns: 1fr; }
  .precios { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .resumen-dia { grid-template-columns: 120px 1fr; gap: 12px; }
  .anillo { width: 120px; height: 120px; }
  .anillo .centro b { font-size: 1.6rem; }
  .dos { grid-template-columns: 1fr; }
  .comparar th, .comparar td { padding: 9px 8px; font-size: .88rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .demo-chip { opacity: 1; }
}
