/* Lía, la tortuga asistente (página y app de adultos) */
.lia[hidden] { display: none; }
.lia-fab {
  position: fixed; z-index: 90; right: 18px; bottom: 18px;
  display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 16px 8px 12px;
  border: 0; border-radius: var(--r-pill); background: var(--ink); color: var(--cream);
  font: inherit; font-weight: 900; font-size: var(--t-body); box-shadow: var(--shadow-3); cursor: pointer;
  transition: transform 120ms var(--ease-snap);
}
.lia-fab svg { width: 54px; height: 36px; }
.lia-fab img { display: block; width: 48px; height: auto; margin: -8px 0 -4px; } /* Lía Bitmoji (09/11/2026) */
.lia-fab:hover { transform: translateY(-2px); }
.lia-fab[aria-expanded="true"] { display: none; }
.lia-fab:focus-visible, .lia-icon:focus-visible, .lia-chip:focus-visible, .lia-go:focus-visible, .lia-again:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.lia-panel {
  position: fixed; z-index: 95; right: 18px; bottom: 18px; width: min(380px, calc(100vw - 24px)); max-height: min(620px, calc(100dvh - 36px));
  display: grid; grid-template-rows: auto 1fr auto auto auto; border-radius: var(--r-lg); overflow: hidden;
  background: var(--cream); border: 1.5px solid var(--line); box-shadow: var(--shadow-3);
}
.lia-panel[hidden] { display: none; }
.lia-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; background: var(--ink); color: var(--cream); }
.lia-head__art { flex: none; width: 52px; height: 36px; }
.lia-head__art svg { width: 100%; height: 100%; }
.lia-head__art:has(img) { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--sage-soft); }
.lia-head__art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lia-head__txt { display: grid; flex: 1; line-height: 1.2; }
.lia-head__txt b { font-size: var(--t-body); }
.lia-head__txt small { opacity: .8; font-size: var(--t-caption); }
.lia-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: inherit; cursor: pointer; }
.lia-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lia-head .lia-icon:hover { background: rgb(255 255 255 / .12); }
.lia-voice[aria-pressed="true"] .lia-voice__off, .lia-voice[aria-pressed="false"] .lia-voice__on { display: none; }

.lia-log { overflow-y: auto; padding: 16px; display: grid; align-content: start; gap: 12px; min-height: 120px; }
.lia-msg { max-width: 88%; padding: 12px 12px 13px; border-radius: var(--r-md); line-height: 1.45; font-size: var(--t-small); }
.lia-msg p { margin: 0; }
.lia-msg--lia { justify-self: start; background: var(--paper); border: 1.5px solid var(--line); border-bottom-left-radius: 6px; color: var(--ink); }
.lia-msg--user { justify-self: end; background: var(--sage-soft); border-bottom-right-radius: 6px; color: var(--ink); }
.lia-msg__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.lia-go { min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: var(--mustard); color: var(--ink); font: inherit; font-size: var(--t-small); font-weight: 800; cursor: pointer; }
.lia-again { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1.5px solid var(--line); border-radius: 50%; background: var(--cream); color: var(--leaf-dark); cursor: pointer; }
.lia-again svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lia-note { color: var(--ink-mut); font-size: var(--t-small); }
.lia-dots { display: flex; gap: 4px; padding: 4px 0; }
.lia-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-mut); animation: lia-dot 1s infinite; }
.lia-dots i:nth-child(2) { animation-delay: .15s; } .lia-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes lia-dot { 50% { opacity: .25; transform: translateY(-2px); } }

.lia-chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 12px; scrollbar-width: thin; }
.lia-chip { flex: none; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r-pill); background: var(--paper); color: var(--ink); font: inherit; font-size: var(--t-caption); font-weight: 700; white-space: nowrap; cursor: pointer; }
.lia-chip:hover { border-color: var(--leaf); }

.lia-form { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--paper); }
.lia-form input { flex: 1; min-width: 0; min-height: 48px; padding: 0 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--cream); font: inherit; color: var(--ink); }
.lia-form input:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 3px var(--sage-soft); }
.lia-form .lia-icon { color: var(--leaf-dark); }
.lia-send { background: var(--mustard) !important; color: var(--ink) !important; }
.lia-mic.is-on { background: var(--coral-soft); color: var(--coral-ink); animation: lia-dot 1.2s infinite; }
.lia-human { margin: 0; padding: 8px 16px 12px; background: var(--paper); font-size: var(--t-caption); color: var(--ink-mut); }
.lia-human a { color: var(--leaf-dark); font-weight: 700; }
.lia-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 520px) {
  .lia-fab { right: 12px; bottom: 12px; padding-right: 16px; }
  .lia-panel { right: 8px; left: 8px; bottom: 8px; width: auto; max-height: calc(100dvh - 16px); }
}
@media (prefers-reduced-motion: reduce) { .lia-dots i, .lia-mic.is-on { animation: none; } .lia-fab { transition: none; } }
@media print { .lia { display: none !important; } }
