/* Integración visual sobre UI-2b. Los dos archivos de imagen originales no se alteran.
   Las poses se encuadran por CSS; sus fondos son opacos, no se simula transparencia. */
:root {
  --accent: #71304f; --accent-fill: #71304f; --accent-ink: #fff;
  --accent-soft: #f3e8ed;
  --u2b-me: #f3e7ed; --u2b-me-ink: #39232e; --u2b-me-line: #e3cbd5;
  --u2b-ok: #f3e7ed; --u2b-ok-ink: #39232e; --u2b-ok-sub: #563946;
  --u2b-btn: #71304f; --u2b-btn-2: #57223b; --u2b-out: #71304f;
  --u2b-out-ink: #51283a; --u2b-ico: #71304f; --u2b-ph: #765966;
  --u2b-sp: #f3e7ed; --u2b-sp-ink: #39232e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #efb6cc; --accent-fill: #71304f; --accent-ink: #fff;
    --accent-soft: #3c2633; --u2b-me: #49303c; --u2b-me-ink: #fff5f8;
    --u2b-ok: #49303c; --u2b-ok-ink: #fff5f8; --u2b-ok-sub: #f7e3eb;
    --u2b-btn: #f3d7e2; --u2b-btn-2: #dfb9c9; --u2b-btn-ink: #391b2b;
    --u2b-out: #efb6cc; --u2b-out-ink: #fff5f8; --u2b-ico: #f0c1d1;
    --u2b-ph: #dcc2cc; --u2b-sp: #49303c; --u2b-sp-on: #684252; --u2b-sp-ink: #fff5f8;
  }
}
:root[data-theme="dark"] {
  --accent: #efb6cc; --accent-fill: #71304f; --accent-ink: #fff;
  --accent-soft: #3c2633; --u2b-me: #49303c; --u2b-me-ink: #fff5f8;
  --u2b-ok: #49303c; --u2b-ok-ink: #fff5f8; --u2b-ok-sub: #f7e3eb;
  --u2b-btn: #f3d7e2; --u2b-btn-2: #dfb9c9; --u2b-btn-ink: #391b2b;
  --u2b-out: #efb6cc; --u2b-out-ink: #fff5f8; --u2b-ico: #f0c1d1;
  --u2b-ph: #dcc2cc; --u2b-sp: #49303c; --u2b-sp-on: #684252; --u2b-sp-ink: #fff5f8;
}
/* El logo completo se muestra con su fondo, tanto en claro como en oscuro. */
.ui2a-top .ui2a-logo { height: 86px; width: auto; max-width: 100%; object-fit: contain; }
@media (min-width: 700px) { .ui2a-top .ui2a-logo { height: 100px; } }
/* Cuerpo entero: el marco abarca la mitad izquierda (512 × 572). */
body .startcard.ui1a-card .ui1a-card-maia.ui2a-ref,
#tabs .ui2a-tabbody.ui1a-ref {
  aspect-ratio: 512 / 572; height: auto; overflow: hidden;
  border-radius: 0; background: #f8f7f0; filter: none;
}
body .startcard.ui1a-card .ui1a-card-maia.ui2a-ref img,
#tabs .ui2a-tabbody.ui1a-ref img {
  position: absolute; display: block; width: 200%; max-width: none; height: auto;
  left: 0; top: 0; mix-blend-mode: normal; transform: none;
  -webkit-mask-image: none; mask-image: none; animation: none;
}
/* La cara usa un encuadre de la pose derecha. */
body .ui1a-ref.ui2a-ref-cara { overflow: hidden; background: #f8f7f0; }
body .ui1a-ref.ui2a-ref-cara img {
  position: absolute; width: 401.57%; max-width: none; height: auto;
  left: -239.22%; top: 0; mix-blend-mode: normal;
  -webkit-mask-image: none; mask-image: none;
}
/* Asomada: marco rectangular completo de la mitad derecha; el cartel viene
   en el JPEG y no se coloca dentro de otra tarjeta. */
.ui1b-pose.ui2a-pose {
  aspect-ratio: 512 / 572; height: auto; overflow: hidden; background: #f8f7f0;
  bottom: calc(100% + 4px);
}
.ui1b-pose.ui2a-pose img {
  position: absolute; display: block; width: 200%; max-width: none; height: auto;
  left: -100%; top: 0; mix-blend-mode: normal; transform: none;
  -webkit-mask-image: none; mask-image: none;
}
.ask { margin-top: 138px; }
.ask-list ~ .ask-bar, .ask-links ~ .ask-bar { margin-top: 138px; }
body.on-chat #app { padding-bottom: calc(var(--tabbar) + var(--safe-b) + var(--composer, 72px) + 150px); }
/* La tarjeta y el indicador activo usan el mismo tono sobrio que el logo. */
body .startcard.ui1a-card {
  background: #f4e9ed; border-color: #cda86e; color: #35252c;
}
body .startcard.ui1a-card .startcard-task,
body .startcard.ui1a-card .ui1d-h,
body .startcard.ui1a-card .ui1e-h { color: #35252c; }
body .startcard.ui1a-card .startcard-k,
body .startcard.ui1a-card .startcard-msg,
body .startcard.ui1a-card .lede,
body .startcard.ui1a-card .ui1d-date { color: #5a404c; }
body .startcard.ui1a-card .btn.on-accent,
body .composer .send, body .ask-bar .send {
  background: linear-gradient(180deg, #71304f, #57223b); color: #fff;
}
#tabs.ui1c-tabs .tab .tab-label, #tabs.ui1c-tabs .tab .tab-svg { color: #71304f; }
#tabs.ui1c-tabs .tab.is-on, #tabs.ui1c-tabs .ui1c-tab-maia.is-on {
  background: #f1dfe7; box-shadow: none;
}
#tabs.ui1c-tabs .tab.is-on .tab-label { color: #51283a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #tabs.ui1c-tabs .tab .tab-label,
  :root:not([data-theme="light"]) #tabs.ui1c-tabs .tab .tab-svg { color: #f1d3df; }
  :root:not([data-theme="light"]) #tabs.ui1c-tabs .tab.is-on { background: #684252; }
  :root:not([data-theme="light"]) #tabs.ui1c-tabs .tab.is-on .tab-label { color: #fff; }
}
:root[data-theme="dark"] #tabs.ui1c-tabs .tab .tab-label,
:root[data-theme="dark"] #tabs.ui1c-tabs .tab .tab-svg { color: #f1d3df; }
:root[data-theme="dark"] #tabs.ui1c-tabs .tab.is-on { background: #684252; }
:root[data-theme="dark"] #tabs.ui1c-tabs .tab.is-on .tab-label { color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .ui1a-ref img, .ui1b-pose img { animation: none !important; transition: none; }
}
/* Variables históricas del tema que aún alimentan botones e íconos. */
:root {
  --maia: #71304f; --tab-ico: #71304f; --ic-v: #71304f; --ic-d: #57223b;
  --leaf: #71304f; --leaf-2: #9a5e74;
  --btn-v: linear-gradient(180deg, #8b4765, #71304f 52%, #57223b);
  --btn-d: linear-gradient(180deg, #71304f, #57223b);
}
/* La figura legada de avisos y voz sigue siendo el mismo control; sólo se
   reemplaza su dibujo visible por el encuadre aprobado. No se toca su handler. */
.toast-maia, .voz .maia-poke {
  background-image: url('/ui_visual_aprobada/poses-v2-original.jpg');
  background-size: 401.57% auto; background-position: 79.33% top;
  background-repeat: no-repeat; background-color: #f8f7f0;
  border-radius: 50%; overflow: hidden;
}
.toast-maia .m3, .voz .maia-poke svg.logo { visibility: hidden; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --maia: #efb6cc; --tab-ico: #efb6cc; --ic-v: #efb6cc; --ic-d: #efb6cc;
    --leaf: #d9a8ba; --leaf-2: #efb6cc;
  }
  :root:not([data-theme="light"]) #tabs.ui1c-tabs .ui1c-tab-maia.ui2a-tab-maia.is-on { background: #684252; }
}
:root[data-theme="dark"] {
  --maia: #efb6cc; --tab-ico: #efb6cc; --ic-v: #efb6cc; --ic-d: #efb6cc;
  --leaf: #d9a8ba; --leaf-2: #efb6cc;
}
:root[data-theme="dark"] #tabs.ui1c-tabs .ui1c-tab-maia.ui2a-tab-maia.is-on { background: #684252; }
.rt-live .maia-poke {
  background: #f8f7f0 url('/ui_visual_aprobada/poses-v2-original.jpg') 79.33% top / 401.57% auto no-repeat;
  border-radius: 50%; overflow: hidden;
}
.rt-live .maia-poke svg.logo { visibility: hidden; }
.ui1b-think { left: 6px; right: auto; }
/* Reserva de alto acorde al panel 512 × 572, sin invadir el botón. */
body .startcard.ui1a-card:has(> .btn) {
  min-height: calc(min((100vw - 32px) * .44, 220px) * 1.191667 + 86px);
}
body .startcard.ui1a-card:not(:has(> .btn)) {
  min-height: calc(min((100vw - 32px) * .36, 190px) * 1.191667 + 6px);
}
body .startcard.ui1a-card.ui1d-card.ui1d-cap {
  min-height: calc(min((100vw - 32px) * .34, 170px) * 1.191667 + 6px);
}
@media (min-width: 700px) {
  body .startcard.ui1a-card:has(> .btn) { min-height: calc(220px * 1.191667 + 92px); }
  body .startcard.ui1a-card:not(:has(> .btn)) { min-height: calc(190px * 1.191667 + 6px); }
  body .startcard.ui1a-card.ui1d-card.ui1d-cap { min-height: calc(170px * 1.191667 + 6px); }
}
/* La lámina derecha empieza en x≈505: encuadrar x=0–480 evita una franja del cartel adyacente.
   La cola y el lápiz completos terminan antes de x=480. */
body .startcard.ui1a-card .ui1a-card-maia.ui2a-ref,
#tabs .ui2a-tabbody.ui1a-ref { aspect-ratio: 480 / 572; }
body .startcard.ui1a-card .ui1a-card-maia.ui2a-ref img,
#tabs .ui2a-tabbody.ui1a-ref img { width: 213.3333%; }
