/* Adenor solto no canto, sem fundo: flutua com uma sombra no chão; tocar abre a conversa
   e ele fica em pé em cima da janela. Arrastar gira em qualquer eixo. */
.adenor { --larg: 132px; --alt: 176px; --palco: 236px; position: fixed; z-index: 58; right: max(10px, env(safe-area-inset-right)); bottom: max(8px, env(safe-area-inset-bottom));
  width: var(--larg); height: var(--alt); transform-origin: 100% 100%;
  transition: width .5s cubic-bezier(.2, .8, .2, 1), height .5s cubic-bezier(.2, .8, .2, 1), transform .5s var(--mola), opacity .4s ease; }
.adenor.is-escondido { opacity: 0; transform: translateY(18px) scale(.6); pointer-events: none; }
.adenor:not(.is-aberto):hover { transform: translateY(-3px) scale(1.04); }
.adenor::before { content: ""; position: absolute; left: 22%; right: 22%; bottom: 0; height: 12px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); pointer-events: none; animation: adenor-sombra 3.4s ease-in-out infinite; }
.adenor.is-aberto::before { opacity: 0; }
.adenor.is-aberto { width: min(392px, calc(100vw - 24px)); height: min(690px, calc(100svh - 24px)); }
.adenor.fala .adenor__tela { animation: adenor-fala .5s ease; }
@keyframes adenor-flutua { 50% { transform: translateY(-7px); } }
@keyframes adenor-sombra { 50% { transform: scaleX(.8); opacity: .55; } }
@keyframes adenor-fala { 30% { transform: translateY(-6px) scale(1.03); } 60% { transform: translateY(1px); } }

.adenor__palco { position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: calc(100% - 6px); animation: adenor-flutua 3.4s ease-in-out infinite; transition: height .5s cubic-bezier(.2, .8, .2, 1); }
.adenor.is-aberto .adenor__palco { height: var(--palco); animation-duration: 4.2s; }
.adenor__poster { position: absolute; left: 6%; top: 4%; width: 88%; height: 96%; object-fit: contain; object-position: 50% 100%; pointer-events: none; transition: opacity .6s ease; }
.adenor.splat-pronto .adenor__poster { opacity: 0; }
.adenor__tela { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; outline: none; -webkit-tap-highlight-color: transparent; }
.adenor__tela:active { cursor: grabbing; }
.adenor__tela:focus-visible { outline: 2px dashed var(--sinal); outline-offset: -4px; border-radius: var(--q-2); }
.adenor__dica { position: absolute; left: 50%; top: 8px; padding: 3px 10px; border-radius: var(--q-papel); background: rgba(13, 12, 11, .72); color: #a39a8e; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.adenor.is-aberto .adenor__dica { opacity: 1; }

.adenor__painel { position: absolute; z-index: 1; left: 0; right: 0; top: calc(var(--palco) - 46px); bottom: 0; display: flex; flex-direction: column; padding-top: 56px; border-radius: var(--q-2);
  background: #1c1917; box-shadow: 0 0 0 1px rgba(239, 233, 223, .12), 0 24px 60px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transform: translateY(16px); transition: opacity .25s ease, transform .45s var(--mola), visibility 0s .5s; }
.adenor.is-aberto .adenor__painel { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease .12s, transform .5s var(--mola) .12s, visibility 0s; }
.adenor__topo { position: absolute; z-index: 3; left: 18px; right: 12px; top: calc(var(--palco) - 34px); display: flex; align-items: center; justify-content: space-between; pointer-events: none;
  opacity: 0; visibility: hidden; transition: opacity .3s ease .1s, visibility 0s .5s; }
.adenor.is-aberto .adenor__topo { opacity: 1; visibility: visible; transition: opacity .3s ease .2s, visibility 0s; }
.adenor__topo strong { display: block; font-family: var(--titulo); font-weight: 800; font-stretch: 80%; font-size: 21px; line-height: 1; }
.adenor__topo span { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #a39a8e; }
.adenor__fecha { pointer-events: auto; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #27231f; color: #efe9df; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(239, 233, 223, .2); transition: color .2s ease, box-shadow .2s ease; }
.adenor__fecha:hover { color: var(--sinal); box-shadow: inset 0 0 0 1.5px var(--sinal); }
.adenor__fecha svg { width: 16px; height: 16px; }

.adenor__historia { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 8px 16px 14px; overflow-y: auto; overscroll-behavior: contain; }
.adenor__msg { max-width: 88%; padding: 10px 14px; border-radius: var(--q-2); font-size: 14.5px; line-height: 1.45; }
.adenor__msg p { margin: 0; }
.adenor__msg--bot { align-self: flex-start; background: #27231f; color: #efe9df; border-bottom-left-radius: var(--q-papel); }
.adenor__msg--eu { align-self: flex-end; background: #b9331a; color: #efe9df; border-bottom-right-radius: var(--q-papel); }
.adenor__quem { display: block; margin-bottom: 3px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; color: #a39a8e; }
.adenor__msg--eu .adenor__quem { color: rgba(239, 233, 223, .78); }
.adenor__escolhas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.adenor__escolhas .ar-fita, .adenor__sugestoes .ar-fita { white-space: normal; text-align: left; line-height: 1.25; padding-top: 7px; padding-bottom: 7px; }
.adenor__sugestoes { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.adenor__digitando { align-self: flex-start; display: inline-flex; gap: 4px; padding: 13px 14px; border-radius: var(--q-2); background: #27231f; }
.adenor__digitando i { width: 6px; height: 6px; border-radius: 50%; background: #a39a8e; animation: adenor-pula 1s ease-in-out infinite; }
.adenor__digitando i:nth-child(2) { animation-delay: .15s; }
.adenor__digitando i:nth-child(3) { animation-delay: .3s; }
@keyframes adenor-pula { 0%, 80%, 100% { transform: none; opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
.adenor__form { display: flex; align-items: flex-end; gap: 8px; margin: 0 12px; padding: 6px 6px 6px 14px; border-radius: var(--q-1); background: #0d0c0b; box-shadow: inset 0 0 0 1px rgba(239, 233, 223, .14); }
.adenor__form:focus-within { box-shadow: inset 0 0 0 1.5px var(--sinal); }
.adenor__form textarea { flex: 1; min-height: 22px; max-height: 110px; padding: 8px 0; border: 0; background: none; color: #efe9df; font: 15px/1.4 var(--corpo); resize: none; outline: none; }
.adenor__form textarea::placeholder { color: #8a8278; }
.adenor__form button { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #b9331a; color: #efe9df; cursor: pointer; transition: transform .3s var(--mola); }
.adenor__form button:hover { transform: scale(1.06); }
.adenor__form button svg { width: 18px; height: 18px; }
.adenor__pe { margin: 8px 0 12px; text-align: center; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: #a39a8e; }
.adenor .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.adenor__balao { position: fixed; z-index: 57; right: calc(max(10px, env(safe-area-inset-right)) + 122px); bottom: calc(max(8px, env(safe-area-inset-bottom)) + 112px); max-width: 220px; margin: 0; padding: 10px 14px;
  border-radius: var(--q-2) var(--q-2) var(--q-papel) var(--q-2); background: #efe9df; color: #151311; font-size: 14px; line-height: 1.35; box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateX(10px) scale(.9); transform-origin: 100% 100%; pointer-events: none; transition: opacity .35s ease, transform .45s var(--mola); }
.adenor__balao b { display: block; font-family: var(--titulo); font-weight: 800; font-stretch: 85%; font-size: 17px; }
.adenor__balao.is-on { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  body:not(.limpo) .adenor { bottom: max(72px, env(safe-area-inset-bottom)); }
  body:not(.limpo) .adenor__balao { bottom: 176px; }
}
@media (max-width: 560px) {
  .adenor { --larg: 104px; --alt: 138px; --palco: 196px; }
  .adenor.is-aberto { right: 10px; bottom: 10px; width: calc(100vw - 20px); height: min(86svh, 660px); }
  body:not(.limpo) .adenor.is-aberto { bottom: 10px; }
  .adenor__balao { right: 104px; max-width: 180px; bottom: 100px; }
  body.adenor-aberto .revisao { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .adenor, .adenor__palco, .adenor__poster, .adenor__balao, .adenor__painel { transition: none; }
  .adenor::before, .adenor__palco, .adenor.fala .adenor__tela, .adenor__digitando i { animation: none; }
}
