:root { --bg:#0f172a; --card:#1e293b; --ink:#e2e8f0; --muted:#94a3b8; --brand:#0f766e; --brand-2:#14b8a6;
  --c1:#dc2626; --c2:#f97316; --c3:#a855f7; --c4:#be123c; --c6:#3b82f6; --c7:#f59e0b; --ok:#22c55e; }
* { box-sizing:border-box } [hidden] { display:none !important } html,body { margin:0; background:var(--bg); color:var(--ink);
  font:16px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; -webkit-font-smoothing:antialiased }
.top { position:sticky; top:0; z-index:5; display:flex; justify-content:space-between; align-items:center;
  padding:12px 16px; background:var(--brand); color:#fff }
.brand { display:flex; align-items:center; gap:8px; font-weight:700; font-size:18px } .brand img { width:28px; height:28px }
main { padding:16px; padding-bottom:84px; max-width:720px; margin:0 auto }
.card { background:var(--card); border-radius:16px; padding:16px; margin-bottom:14px }
h2 { margin:0 0 10px; font-size:18px } h3 { margin:14px 0 6px; font-size:15px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em }
.hint { color:var(--muted); font-size:14px; margin:6px 0 }
input,textarea,button,select { font:inherit } input,textarea { width:100%; padding:12px; border-radius:10px; border:1px solid #334155; background:#0b1220; color:var(--ink) }
button { padding:12px 16px; border:0; border-radius:10px; background:var(--brand-2); color:#042f2e; font-weight:700; cursor:pointer }
button.secondary { background:#334155; color:var(--ink) } button.link { background:none; color:#fff; text-decoration:underline; padding:4px }
.row { display:flex; gap:8px; margin-top:10px } .row input { flex:1 } .col { display:flex; flex-direction:column; gap:8px; margin-top:10px }
.file { display:block; text-align:center; padding:14px; border:2px dashed #475569; border-radius:12px; margin:10px 0; cursor:pointer }
.file input { display:none } #preview { width:100%; border-radius:12px; margin-top:10px }
.viewfinder { position:relative; aspect-ratio:4/3; background:#000; border-radius:12px; overflow:hidden }
.viewfinder video { width:100%; height:100%; object-fit:cover }
.reticle { position:absolute; inset:25% 10%; border:2px solid rgba(20,184,166,.9); border-radius:8px; pointer-events:none }
.tabs { position:fixed; bottom:0; left:0; right:0; display:flex; background:#0b1220; border-top:1px solid #1e293b; padding-bottom:env(safe-area-inset-bottom) }
.tabs button { flex:1; background:none; color:var(--muted); border-radius:0; padding:14px 4px; font-size:13px; font-weight:600 }
.tabs button.active { color:var(--brand-2) }
fieldset { border:1px solid #334155; border-radius:10px; margin:10px 0; padding:8px 12px } legend { color:var(--muted); font-size:13px; padding:0 6px }
.chips { display:flex; flex-wrap:wrap; gap:6px } .chip { display:inline-flex; align-items:center; gap:4px; padding:6px 10px; border-radius:999px; background:#0b1220; border:1px solid #334155; font-size:14px; cursor:pointer }
.chip input { width:auto; margin:0 } .chip.on { border-color:var(--brand-2); background:#042f2e }
.sheet { position:fixed; inset:0; background:rgba(0,0,0,.6); z-index:10; display:flex; align-items:flex-end }
.sheet-body { background:var(--bg); width:100%; max-height:92vh; overflow:auto; border-radius:18px 18px 0 0; padding:18px 16px 32px; position:relative; max-width:720px; margin:0 auto }
.close { position:absolute; right:10px; top:8px; background:none; color:var(--muted); font-size:26px; padding:4px 10px }
.toast { position:fixed; left:50%; bottom:90px; transform:translateX(-50%); background:#fef3c7; color:#78350f; padding:10px 14px; border-radius:10px; z-index:20; font-weight:600; max-width:90% }
.octo { display:inline-block; background:#000; color:#fff; border:2px solid #fff; padding:8px 10px; font-weight:800; font-size:12px; text-align:center; clip-path:polygon(30% 0,70% 0,100% 30%,100% 70%,70% 100%,30% 100%,0 70%,0 30%); margin:4px 4px 4px 0; min-width:84px }
.alert { border-left:4px solid; padding:8px 10px; border-radius:8px; background:#0b1220; margin:6px 0; font-size:14px }
.alert.p1 { border-color:var(--c1) } .alert.p2 { border-color:var(--c2) } .alert.p3 { border-color:var(--c7) }
.ing { padding:10px 0; border-bottom:1px solid #1e293b } .ing.sub { padding-left:16px } .ing .name { font-weight:600 } .ing .canon { color:var(--muted); font-size:13px }
.ing.unknown .name { color:var(--muted); font-style:italic }
.badge { display:inline-block; font-size:12px; font-weight:700; padding:2px 8px; border-radius:6px; color:#fff; margin:4px 4px 0 0 }
.b1{background:var(--c1)} .b2{background:var(--c2)} .b3{background:var(--c3)} .b4{background:var(--c4)} .b6{background:var(--c6)} .b7{background:var(--c7);color:#000}
.flag { font-size:13px; color:var(--muted); margin:2px 0 0 } .flag a { color:var(--brand-2) }
/* Nível de nocividade (rojo > naranja > amarillo > verde; sin_datos = cinza; info = azul claro: contexto, não é risco) */
:root { --n-rojo:#dc2626; --n-naranja:#f97316; --n-amarillo:#eab308; --n-verde:#22c55e; --n-sin_datos:#64748b; --n-info:#7dd3fc }
.n-rojo { --n:var(--n-rojo) } .n-naranja { --n:var(--n-naranja) } .n-amarillo { --n:var(--n-amarillo) } .n-verde { --n:var(--n-verde) } .n-sin_datos { --n:var(--n-sin_datos) } .n-info { --n:var(--n-info) } .n-neutro { --n:var(--ink) }
.dot { display:inline-block; width:10px; height:10px; border-radius:50%; background:var(--n,var(--n-sin_datos)); margin-right:8px; vertical-align:middle }
/* Símbolo de categoria: a forma diz o tipo, a cor (--n) diz o nível */
.sym { display:inline-block; width:17px; height:17px; color:var(--n); vertical-align:-3px; margin-left:4px } .sym svg { width:100%; height:100%; display:block }
.lista .sym { width:14px; height:14px; margin-left:2px; vertical-align:-2px } .motivo .sym { width:15px; height:15px; margin:0 6px 0 0 } .syms { white-space:nowrap }
.alg { color:var(--n-info); font-weight:800 } .alg.mia, .mia-txt { color:var(--n-rojo) } .mia-txt { font-size:12px }
.leyenda { font-size:12px; color:var(--muted); background:#0b1220; border-radius:8px; padding:8px 10px; margin:8px 0 } .ley-tit { font-weight:700; margin-bottom:2px }
.ley-it { display:inline-flex; align-items:center; margin:3px 12px 0 0; white-space:nowrap } .ley-it .sym { margin:0 4px 0 0 } .ley-it .dot { margin-right:5px }
.ley-fila { display:flex; align-items:flex-start; gap:6px; margin-top:4px } .ley-fila .sym { margin:1px 0 0; flex:none }
.alg-nota { font-size:13px; color:var(--muted); background:#0b1220; border-left:3px solid var(--n-info); border-radius:8px; padding:8px 10px; margin:8px 0 } .alg-nota.mia { border-left-color:var(--n-rojo) } .alg-nota .sym { margin:0 2px 0 0 } .alg-nota b { color:var(--ink) } .alg-nota .link { padding:0; font-size:13px; text-decoration:underline }
.niv { display:inline-block; font-size:12px; font-weight:700; padding:2px 8px; border-radius:6px; margin:6px 6px 0 0; color:#fff; background:var(--n) } .n-amarillo.niv { color:#000 }
.motivo { font-size:14px; margin:4px 0 0 2px } .motivo .dot { width:8px; height:8px } .motivo .meta { font-size:12px } .motivo a { color:var(--brand-2) }
.ctx { font-size:13px; color:var(--muted); margin:3px 0 2px 16px; padding-left:8px; border-left:2px solid var(--n-sin_datos) } .ctx strong { font-weight:600 }
.evid { margin-top:6px } .evid summary { font-size:12px; color:var(--muted); cursor:pointer }
.aviso { font-size:13px; color:#fde68a; background:#422006; padding:10px; border-radius:10px; margin-top:14px }
.meta { color:var(--muted); font-size:13px } .ok { color:var(--ok) } .warn { color:#fbbf24 }
.spinner { display:inline-block; width:18px; height:18px; border:3px solid #334155; border-top-color:var(--brand-2); border-radius:50%; animation:sp 1s linear infinite; vertical-align:middle }
@keyframes sp { to { transform:rotate(360deg) } }
.choices { display:flex; flex-direction:column; gap:10px; margin-top:8px }
.choice { display:flex; flex-direction:column; align-items:flex-start; gap:2px; text-align:left; background:#0b1220; color:var(--ink); border:1px solid #334155; padding:14px; border-radius:14px }
.choice:active { border-color:var(--brand-2) } .choice .ico { font-size:22px; color:var(--brand-2) } .choice small { color:var(--muted); font-weight:400 }
.premium-tag { display:inline-block; font-size:11px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; padding:2px 7px; border-radius:6px; background:#fbbf24; color:#422006; vertical-align:middle }
.cupo-tag { display:inline-block; font-size:11px; font-weight:700; padding:2px 7px; border-radius:6px; background:#0b1220; border:1px solid var(--brand-2); color:var(--brand-2); vertical-align:middle }
.choice.locked { opacity:.75 } .tabs button.locked::after { content:" ★"; color:#fbbf24; font-size:10px; vertical-align:super }
.paywall h2 { margin-top:8px } .paywall button { margin-top:10px }
.notice { background:#422006; color:#fde68a; padding:10px 12px; border-radius:10px; font-weight:600 }
.lista { background:#0b1220; border:1px solid #334155; border-radius:10px; padding:12px; font-size:15px; line-height:1.5 }
/* Cuenta: registro, login y lista de ingredientes que la persona no puede consumir */
#btn-user { max-width:52vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.campo { display:block; font-size:13px; color:var(--muted) } .campo input { margin-top:4px } .campo + button { margin-top:12px }
.chip .x { background:none; color:var(--muted); padding:0 0 0 4px; font-size:17px; line-height:1; font-weight:400 }
button.chip { color:var(--ink); font-weight:400; padding:6px 10px } button.chip.add { border-style:dashed }
.top5 { margin-top:10px } .top5 .hint { display:block; margin:0 0 4px }
.auto { position:relative } .sug-box { margin-top:6px; border:1px solid #334155; border-radius:10px; background:#0b1220; max-height:240px; overflow:auto }
.sug-box button { display:block; width:100%; text-align:left; background:none; color:var(--ink); font-weight:400; border-radius:0; padding:11px 12px; border-bottom:1px solid #1e293b }
.sug-box button:last-child { border-bottom:0 } .sug-box button.activo, .sug-box button:hover { background:#042f2e }
.sug-box small { color:var(--n-info); margin-left:6px } .sug-box .vacio { padding:10px 12px; margin:0 }
.veto { background:#450a0a; border:1px solid var(--n-rojo); color:#fecaca; border-radius:10px; padding:10px 12px; margin:10px 0; font-size:14px }
.veto .tit { display:block; color:#fff; font-size:16px; margin-bottom:2px } .veto b { color:#fff } .veto .sym { margin:0 6px 0 0 }
.veto-txt { color:#fca5a5 } .card .link { color:var(--brand-2) }
