/* ==========================================================================
   1.61.0 · La cocina de sobras (rediseño del 3 nov, tableros Q1–Q4)
   Solo en /que-cocino/ (web y app). Colores con los tokens de tnp-public.css
   (--tnp-*) para que el modo oscuro los cambie; los fijos van con su texto en
   la misma regla (el generador los oscurece juntos). Las hojas usan la pieza
   de la calculadora (.tnp-k-hoja, .tnp-k-premium, .tnp-k-btn).
   ========================================================================== */

.tnp-s { position: relative; max-width: 720px; margin: 0 auto; font-family: var(--tnp-font); color: var(--tnp-texto); scroll-margin-top: 88px; }
.tnp-s [hidden] { display: none !important; }
.tnp-s svg, .tnp-s-hoja svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tnp-s svg.ilus, .tnp-s-hoja svg.ilus, .tnp-s svg.tnp-s-marco, .tnp-s-hoja svg.tnp-s-marco { width: 100%; height: 100%; stroke: none; }
.tnp-s svg.tnp-s-marco, .tnp-s-hoja svg.tnp-s-marco { fill: none; }
.tnp-s-vista { display: flex; flex-direction: column; gap: 12px; }
.tnp-s-vista > * { margin: 0; }
.tnp-s-vista:focus, .tnp-s-h1:focus, .tnp-s-h2:focus { outline: none; }

/* Cabecera: enlace atrás, etiqueta y titular */
.tnp-s-cab { display: flex; align-items: center; min-height: 52px; margin: 0 0 -4px -8px; }
.tnp-s-atras { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 12px 0 6px; border: 0; border-radius: 999px; background: transparent; color: var(--tnp-verde); font: 600 15px/1 var(--tnp-font); text-decoration: none; cursor: pointer; }
.tnp-s-atras:hover { background: var(--tnp-menta); color: var(--tnp-verde); }
.tnp-s-etq { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tnp-terracota); }
.tnp-s-h1 { font-family: var(--tnp-display); font-weight: 600; font-size: 32px; line-height: 1.08; letter-spacing: -0.02em; color: var(--tnp-texto); margin: 0; }
.tnp-s-h1.is-foto, .tnp-s-h1.is-res { font-size: 30px; }
.tnp-s-h2 { font-family: var(--tnp-display); font-weight: 600; font-size: 22px; line-height: 1.15; letter-spacing: -0.01em; color: var(--tnp-texto); margin: 0; }
.tnp-s-sub { font-size: 16px; line-height: 1.5; color: var(--tnp-texto-suave); }
.tnp-s-nota { font-size: 14px; line-height: 1.45; color: var(--tnp-texto-suave); margin-top: -4px !important; }
.tnp-s-mini { font-size: 13px; line-height: 1.45; color: var(--tnp-texto-suave); }
.tnp-s-estado:empty { display: none; }
.tnp-s-estado { font-size: 14px; color: var(--tnp-texto-suave); }

/* Buscador y botón de la foto */
.tnp-s-fila { display: flex; gap: 10px; margin-top: 6px !important; }
.tnp-s-busca { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; box-sizing: border-box; border: 1.5px solid var(--tnp-borde); border-radius: 12px; background: var(--tnp-superficie); color: var(--tnp-texto-suave); }
.tnp-s-busca:focus-within { border-color: var(--tnp-verde); outline: 2px solid var(--tnp-verde); outline-offset: 1px; }
.tnp-s .tnp-s-busca input { flex: 1 1 auto; width: 100%; min-width: 0; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; outline: none; background: transparent; box-shadow: none; font: 400 17px/1.2 var(--tnp-font); color: var(--tnp-texto); -webkit-appearance: none; appearance: none; }
.tnp-s .tnp-s-busca input::placeholder { color: var(--tnp-texto-suave); opacity: .85; }
.tnp-s .tnp-s-busca input:focus, .tnp-s .tnp-s-busca input:focus-visible { outline: none; box-shadow: none; border: 0; } /* El contorno lo lleva la caja. */
.tnp-s-foto { position: relative; flex: none; width: 52px; height: 52px; padding: 0; border: 1.5px solid var(--tnp-verde); border-radius: 12px; background: var(--tnp-menta); color: var(--tnp-verde); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.tnp-s-foto:hover { box-shadow: var(--tnp-sombra-elevada); }
.tnp-s-foto:focus-visible { outline: 2px solid var(--tnp-verde); outline-offset: 2px; }
.tnp-s .tnp-s-foto > svg { width: 24px; height: 24px; stroke-width: 1.8; }
.tnp-s-foto-candado { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 999px; background: var(--tnp-ambar); color: #1F2A26; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--tnp-crema); }
.tnp-s .tnp-s-foto-candado svg { width: 12px; height: 12px; stroke-width: 2.6; }
.tnp-s-lista { list-style: none; margin: -4px 0 0 !important; padding: 6px; border: 1px solid var(--tnp-borde); border-radius: 12px; background: var(--tnp-superficie); box-shadow: var(--tnp-sombra-elevada); max-height: 320px; overflow: auto; }
.tnp-s-op { display: flex; align-items: center; min-height: 44px; margin: 0; padding: 0 12px; border-radius: 8px; font-size: 16px; color: var(--tnp-texto); cursor: pointer; }
.tnp-s-op.is-activa, .tnp-s-op:hover { background: var(--tnp-menta); }
.tnp-s-op.is-vacio { color: var(--tnp-texto-suave); cursor: default; background: transparent; }

/* Chips */
.tnp-s-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tnp-s-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; box-sizing: border-box; border: 1.5px solid var(--tnp-borde); border-radius: 999px; background: var(--tnp-superficie); color: var(--tnp-texto); font: 400 16px/1.2 var(--tnp-font); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color .15s, background-color .15s; }
@media (hover: hover) { .tnp-s-chip:hover { border-color: var(--tnp-verde); } .tnp-s-chip.is-sug:hover { border-style: solid; } }
.tnp-s-chip:focus-visible, .tnp-s-quitar:focus-visible { outline: 2px solid var(--tnp-verde); outline-offset: 2px; }
.tnp-s-chip-ok { display: none; font-weight: 700; color: var(--tnp-verde); }
.tnp-s-chip[aria-pressed="true"] { border-color: var(--tnp-verde); background: var(--tnp-menta); color: var(--tnp-texto); padding-left: 12px; }
.tnp-s-chip[aria-pressed="true"] .tnp-s-chip-ok { display: inline; }
/* «Tienes»: verdes, con × para quitar */
.tnp-s-tienes { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--tnp-superficie); box-shadow: var(--tnp-sombra); margin-top: 4px !important; }
.tnp-s-tienes > * { margin: 0; }
.tnp-s-tienes-tit { font-size: 14px; font-weight: 600; color: var(--tnp-texto-suave); }
.tnp-s-chip.is-on { min-height: 36px; padding: 0 2px 0 14px; gap: 0; border: 0; background: var(--tnp-verde); color: #FFFFFF; font-size: 15px; font-weight: 500; cursor: default; }
.tnp-s-chip.is-on:hover { border-color: transparent; }
.tnp-s-quitar { position: relative; width: 34px; height: 34px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: transparent; color: inherit; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.tnp-s-quitar::after { content: ""; position: absolute; inset: -5px; } /* 44 × 44 de toque (el chip mide 36). */
.tnp-s-quitar:hover { background: rgba(255, 255, 255, .16); }
.tnp-s .tnp-s-quitar svg { width: 16px; height: 16px; stroke-width: 2.4; }
.tnp-s-tambien { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid #EFE8DE; }
.tnp-s-tambien > * { margin: 0; }
.tnp-s-tambien-tit { font-size: 14px; font-weight: 600; color: var(--tnp-terracota); }
.tnp-s-chip.is-sug { gap: 8px; padding: 0 14px; border: 1.5px dashed var(--tnp-ambar); background: #FDF6EE; color: #1F2A26; }
.tnp-s-chip.is-sug strong { font-size: 15px; font-weight: 600; }
.tnp-s-chip.is-sug small { font-size: 13px; color: #A85B16; }
/* Q4: los de la foto, en verde suave y con × */
.tnp-s-chips.is-foto .tnp-s-chip.is-on { min-height: 44px; padding-left: 16px; border: 1.5px solid var(--tnp-verde); background: var(--tnp-menta); color: var(--tnp-texto); font-size: 16px; }
.tnp-s-chips.is-foto .tnp-s-quitar { width: 40px; height: 40px; color: var(--tnp-verde); }
.tnp-s-chips.is-foto .tnp-s-quitar:hover { background: var(--tnp-superficie); }
.tnp-s-chip.is-anadir { border: 1.5px dashed #9FBCAF; background: transparent; color: var(--tnp-verde); font-weight: 600; }

/* Grupos de chips */
.tnp-s-grupos { display: grid; gap: 18px; padding-bottom: 8px; }
.tnp-s-grupo { display: grid; gap: 10px; }
.tnp-s-grupo-tit { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--tnp-texto-suave); }

/* Barra de abajo (fija) */
.tnp-s-barra { position: sticky; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px calc(-1 * var(--gutter, 20px)) 0; padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px)); border-radius: 20px 20px 0 0; background: var(--tnp-superficie); box-shadow: 0 -4px 24px rgba(31, 42, 38, 0.10); transition: bottom .25s ease; }
.tnp-s-barra-txt { display: grid; gap: 2px; min-width: 0; }
.tnp-s-barra-n { display: flex; align-items: baseline; gap: 6px; font-size: 16px; font-weight: 500; color: var(--tnp-texto); }
.tnp-s-barra-n strong { font-family: var(--tnp-display); font-size: 30px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.tnp-s-barra-txt small { font-size: 14px; color: var(--tnp-texto-suave); }
@media (min-width: 760px) { .tnp-s-barra { margin-left: 0; margin-right: 0; } }
/* En la app, encima de la barra de pestañas (abajo en el móvil); cuando se esconde al bajar, baja también. */
@media (max-width: 899px) {
	.app-herramienta .tnp-s-barra { bottom: calc(61px + env(safe-area-inset-bottom, 0px)); padding-bottom: 16px; }
	body:has(.tabbar.is-oculta) .app-herramienta .tnp-s-barra { bottom: 0; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}

/* Botones */
.tnp-s-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; box-sizing: border-box; border: 0; border-radius: 999px; background: var(--tnp-verde); color: #FFFFFF; font: 600 16px/1.2 var(--tnp-font); text-align: center; text-decoration: none; cursor: pointer; flex: none; }
.tnp-s-btn:hover { background: #274F44; color: #FFFFFF; }
.tnp-s-btn:focus-visible { outline: 2px solid var(--tnp-verde); outline-offset: 3px; }
.tnp-s-btn[disabled] { background: var(--tnp-borde); color: var(--tnp-texto-suave); cursor: not-allowed; }
.tnp-s-btn.is-ancho { width: 100%; min-height: 56px; }
.tnp-s-btn.is-borde { width: 100%; min-height: 48px; border: 1.5px solid var(--tnp-verde); background: transparent; color: var(--tnp-verde); }
.tnp-s-btn.is-borde:hover { background: var(--tnp-menta); color: var(--tnp-verde); }

/* Q2 · resultados */
.tnp-s-resumen { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 8px 4px 16px; border-radius: 12px; background: var(--tnp-superficie); box-shadow: var(--tnp-sombra); }
.tnp-s-resumen-txt { margin: 0; padding: 8px 0; font-size: 15px; line-height: 1.45; color: var(--tnp-texto-suave); }
.tnp-s-resumen-txt strong { font-weight: 600; color: var(--tnp-texto); }
.tnp-s-resumen-mom { font-size: 14px; color: var(--tnp-verde); }
.tnp-s-cambiar { flex: none; min-height: 44px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--tnp-verde); font: 600 15px/1 var(--tnp-font); cursor: pointer; }
.tnp-s-cambiar:hover { background: var(--tnp-menta); }
.tnp-s-cambiar:focus-visible { outline: 2px solid var(--tnp-verde); outline-offset: 2px; }
.tnp-s-sec-cab { display: flex; align-items: center; gap: 10px; margin-top: 8px !important; }
.tnp-s-sec-cab.is-una { justify-content: space-between; margin-top: 18px !important; }
.tnp-s-pastilla { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: var(--tnp-menta); color: var(--tnp-verde); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tnp-s-sec-n { font-size: 15px; color: var(--tnp-texto-suave); }
.tnp-s-vacio { margin: 0; padding: 14px 16px; border-radius: 16px; background: var(--tnp-superficie); color: var(--tnp-texto-suave); font-size: 15px; line-height: 1.5; grid-column: 1 / -1; }
.tnp-s-rejilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .tnp-s-rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tnp-s-card { display: flex; flex-direction: column; gap: 4px; padding: 8px 8px 14px; border-radius: 16px; background: var(--tnp-superficie); box-shadow: var(--tnp-sombra); color: var(--tnp-texto); text-decoration: none; min-width: 0; }
.tnp-s-card:hover { box-shadow: var(--tnp-sombra-elevada); color: var(--tnp-texto); }
.tnp-s-card:focus-visible, .tnp-s-fila-a:focus-visible { outline: 2px solid var(--tnp-verde); outline-offset: 2px; }
.tnp-s-card-foto { display: block; height: 124px; margin-bottom: 6px; border-radius: 12px; overflow: hidden; background: var(--tnp-menta); }
.tnp-s-card-foto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tnp-s img.is-rota { visibility: hidden; }
.tnp-s-card.is-bloq .tnp-s-card-foto img, .tnp-s-fila-r.is-bloq .tnp-s-fila-foto img { opacity: .6; }
.tnp-s-card > span:not(.tnp-s-card-foto) { padding: 0 4px; }
.tnp-s-card-etq { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--tnp-terracota); }
.tnp-s .tnp-s-card-etq svg { width: 12px; height: 12px; stroke-width: 2.4; }
.tnp-s-card-etq.is-abierta { color: var(--tnp-verde); }
/* 1.61.0 (auditoría A-1): «Sin cebolla», la etiqueta de Hoy (colores de .tnp-comida-tag-sin, tnp-public.css). */
.tnp-s-card > span.tnp-s-card-sin, .tnp-s-fila-txt > span.tnp-s-card-sin { justify-self: start; align-self: flex-start; margin: 0 4px; padding: 2px 8px; font-size: 12px; }
.tnp-s-fila-txt > span.tnp-s-card-sin { margin: 0; }
.tnp-s-card-tit { font-size: 16px; font-weight: 600; line-height: 1.3; }
.tnp-s-card-ver { font-size: 13px; font-weight: 500; color: var(--tnp-verde); }
.tnp-s-card-meta { font-size: 14px; color: var(--tnp-texto-suave); }
.tnp-s .tnp-s-card-ok { align-self: flex-start; display: inline-flex; align-items: center; margin: 4px 0 0 4px; padding: 3px 8px; border-radius: 999px; background: var(--tnp-menta); color: var(--tnp-verde); font-size: 13px; font-weight: 600; }
.tnp-s-filas { display: grid; gap: 10px; }
.tnp-s-fila-r { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 16px; background: var(--tnp-superficie); box-shadow: var(--tnp-sombra); }
.tnp-s-fila-a { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; border-radius: 12px; color: var(--tnp-texto); text-decoration: none; }
.tnp-s-fila-a:hover { color: var(--tnp-texto); }
.tnp-s-fila-foto { flex: none; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--tnp-menta); }
.tnp-s-fila-foto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tnp-s-fila-txt { flex: 1 1 auto; min-width: 0; display: grid; gap: 3px; }
.tnp-s-fila-falta { font-size: 14px; color: var(--tnp-texto-suave); }
.tnp-s-fila-falta strong { font-weight: 600; color: var(--tnp-texto); }
.tnp-s-carrito { flex: none; width: 44px; height: 44px; padding: 0; border: 1.5px solid var(--tnp-borde); border-radius: 999px; background: var(--tnp-superficie); color: var(--tnp-verde); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.tnp-s-carrito:hover { border-color: var(--tnp-verde); }
.tnp-s-carrito:focus-visible { outline: 2px solid var(--tnp-verde); outline-offset: 2px; }
.tnp-s-carrito.is-hecho { border-color: var(--tnp-verde); background: var(--tnp-verde); color: #FFFFFF; cursor: default; }
.tnp-s-hoy { margin-top: 16px !important; text-align: center; }
.tnp-s-hoy a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--tnp-verde); font-weight: 600; text-decoration: none; }
.tnp-s-toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 60; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); margin: 0; padding: 12px 18px; border-radius: 12px; background: var(--tnp-texto); color: #FFFFFF; font-size: 14px; line-height: 1.4; box-shadow: var(--tnp-sombra-elevada); }
.tnp-s-toast a { color: #FFFFFF; font-weight: 600; }

/* Puente al test (sin plan) */
.tnp-s-puente { display: grid; gap: 12px; margin-top: 22px !important; padding: 28px 22px; border-radius: 20px; background: var(--tnp-menta); color: var(--tnp-texto); }
.tnp-s-puente > * { margin: 0; }
.tnp-s-puente-tit { font-family: var(--tnp-display); font-weight: 600; font-size: 28px; line-height: 1.12; letter-spacing: -0.01em; color: var(--tnp-texto); }
.tnp-s-puente p { font-size: 16px; line-height: 1.55; color: #3F5249; }
.tnp-s-puente .tnp-s-btn { margin-top: 4px; }
.tnp-s .tnp-s-puente .tnp-s-aval { font-size: 14px; text-align: center; color: var(--tnp-texto-suave); }

/* Q4 · la foto (con plan) */
.tnp-s-foto-marco { position: relative; height: 168px; border-radius: 20px; overflow: hidden; background: var(--tnp-menta); }
.tnp-s-foto-marco img, .tnp-s-foto-ilus { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.tnp-s-foto-marco.con-foto .tnp-s-foto-ilus { display: none; }
.tnp-s-foto-etq { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; background: var(--tnp-superficie); color: var(--tnp-texto); font-size: 13px; font-weight: 600; }
.tnp-s-foto-otra { position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px; background: var(--tnp-superficie); color: var(--tnp-verde); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--tnp-sombra-elevada); cursor: pointer; }
.tnp-s-foto-otra:focus-visible { outline: 2px solid var(--tnp-verde); outline-offset: 2px; }
.tnp-s-foto-otra[disabled] { opacity: .6; cursor: wait; }

/* Hojas: lo que añade a la de la calculadora (el asa y el dibujo de Q3) */
.tnp-s-hoja .tnp-k-hoja-in { padding-top: 12px; }
.tnp-s-asa { justify-self: center; display: block; width: 40px; height: 5px; border-radius: 999px; background: #E5DED4; }
.tnp-s-hoja-ilus { position: relative; height: 190px; border-radius: 20px; overflow: hidden; background: var(--tnp-menta); }
.tnp-s-hoja-ilus svg { position: absolute; inset: 0; }
.tnp-s-hoja .tnp-k-premium svg { width: 12px; height: 12px; stroke-width: 2.4; }

@media (min-width: 700px) {
	.tnp-s-h1 { font-size: 36px; }
	.tnp-s-h1.is-foto, .tnp-s-h1.is-res { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
	.tnp-s-chip, .tnp-s-barra { transition: none; }
}
