/* ── Oso Calidoso · widget nativo de SIG 1.0 (sistema «Sello») ─────── */
.oso-bubble { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; background: var(--verde-deep); box-shadow: 0 12px 30px -8px rgba(7,31,27,.6), 0 0 0 3px var(--bronce-2); display: grid; place-items: center; overflow: hidden; transition: transform .2s var(--ease); padding: 0; }
.oso-bubble:hover { transform: translateY(-2px) scale(1.03); }
.oso-bubble img { width: 52px; height: 52px; object-fit: cover; }
.oso-bubble__dot { position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--bronce-2); border: 2px solid var(--verde-deep); display: none; }
.oso-bubble.has-new .oso-bubble__dot { display: block; }
.oso-panel { position: fixed; right: 20px; bottom: 92px; z-index: 95; width: min(400px, calc(100vw - 40px)); height: min(640px, calc(100dvh - 112px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--sh-3); display: none; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.oso-panel.is-open { display: grid; animation: oso-in .22s var(--ease); }
@keyframes oso-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .oso-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; } .oso-bubble { right: 16px; bottom: 16px; } body.oso-open .cta-bar { display: none !important; } }
.oso-hd { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; background: var(--verde-deep); color: var(--on-verde); }
.oso-hd img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--bronce-2); }
.oso-hd__t { flex: 1; min-width: 0; line-height: 1.15; }
.oso-hd__t b { font-family: var(--f-display); display: block; color: #fff; }
.oso-hd__t small { color: rgba(243,246,244,.75); font-size: var(--fs-0); }
.oso-hd .btn--icon { background: rgba(255,255,255,.1); color: #fff; }
.oso-msgs { overflow: auto; padding: 1rem; display: grid; gap: .75rem; align-content: start; background: var(--bg); scroll-behavior: smooth; }
.oso-m { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: .5rem; align-items: end; max-width: 92%; }
.oso-m img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.oso-m__b { background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: .6rem .8rem; font-size: var(--fs-1); line-height: 1.55; overflow-wrap: anywhere; }
.oso-m__b p { margin: 0 0 .4rem; } .oso-m__b p:last-child { margin: 0; }
.oso-m__b ul { margin: .2rem 0 .3rem; padding-left: 1.1rem; display: grid; gap: .25rem; }
.oso-m__b a { color: var(--accent); font-weight: 600; }
.oso-m--user { grid-template-columns: minmax(0, 1fr); justify-self: end; }
.oso-m--user .oso-m__b { background: var(--verde); color: #F3F6F4; border-color: transparent; border-radius: 14px 14px 4px 14px; }
.oso-fichas { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.oso-fichas a { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .6rem; border-radius: var(--r-pill); background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--ink); font-family: var(--f-mono); font-size: .72rem; font-weight: 600; text-decoration: none; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); }
.oso-fichas a:hover { background: color-mix(in srgb, var(--gold) 28%, transparent); }
.oso-typing { display: inline-flex; gap: 4px; padding: .7rem .8rem; }
.oso-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); animation: oso-blink 1.2s infinite; } .oso-typing i:nth-child(2) { animation-delay: .2s; } .oso-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes oso-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.oso-sys { text-align: center; font-size: var(--fs-0); color: var(--muted); }
.oso-ft { border-top: 1px solid var(--line); padding: .6rem .75rem; display: grid; gap: .45rem; background: var(--surface); }
.oso-form { display: flex; gap: .5rem; align-items: flex-end; }
.oso-form textarea { flex: 1; min-height: 42px; max-height: 120px; resize: none; padding: .6rem .8rem; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-1); line-height: 1.4; }
.oso-form textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.oso-send { width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; display: grid; place-items: center; flex: none; }
.oso-send:disabled { opacity: .5; cursor: not-allowed; }
.oso-send svg { width: 20px; height: 20px; }
.oso-acts { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: var(--fs-0); color: var(--muted); }
.oso-acts button { border: 0; background: none; color: var(--accent); font: inherit; font-size: var(--fs-0); font-weight: 600; cursor: pointer; padding: .2rem 0; }
.oso-sug { display: flex; flex-wrap: wrap; gap: .35rem; }
.oso-sug button { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); border-radius: var(--r-pill); padding: .35rem .7rem; font-size: var(--fs-0); font-weight: 600; cursor: pointer; }
.oso-sug button:hover { background: var(--bg-2); }
.oso-gate { padding: 1.5rem 1.25rem; display: grid; gap: .75rem; justify-items: center; text-align: center; align-content: center; height: 100%; }
.oso-gate img { width: 96px; }
.oso-gate p { color: var(--muted); font-size: var(--fs-1); max-width: 30ch; }
/* encuesta de hormigas */
.oso-enc { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .8rem .9rem; display: grid; gap: .5rem; font-size: var(--fs-1); }
.oso-enc b { font-family: var(--f-display); }
.oso-ants { display: flex; gap: .25rem; }
.oso-ants button { border: 0; background: none; cursor: pointer; padding: .15rem; color: var(--muted-2); transition: color .12s, transform .12s; }
.oso-ants button svg { width: 28px; height: 28px; }
.oso-ants button.is-on, .oso-ants button:hover { color: var(--bronce-deep); transform: translateY(-1px); }
:root[data-theme="dark"] .oso-ants button.is-on { color: var(--bronce-2); } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .oso-ants button.is-on { color: var(--bronce-2); } }
.oso-enc__row { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.oso-enc input { flex: 1; min-width: 0; padding: .45rem .6rem; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-0); }
