@import url("/tokens.css");

* { box-sizing: border-box; }

:root {
  --embed-inset: 0px;
  --embed-pad-x: 0px;
  --embed-pad-y: 0px;
}

html, body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--default-font);
  background: var(--accent-color);
  color: var(--text-color);
  overflow: hidden; /* scroll fica no .stage (embed-safe) */
  touch-action: manipulation; /* sem double-tap zoom no WebView */
  -ms-touch-action: manipulation;
  overscroll-behavior: none;
}

body {
  background-image:
    linear-gradient(160deg, rgba(6, 1, 24, 0.94), rgba(6, 1, 24, 0.9)),
    url("/assets/site/slider-bg1.webp");
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
}

.shell {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  padding: 72px var(--space-3) 96px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow: hidden;
}

/* Ilhas dinamicas - top (brand) e bottom (composer) */
.island {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 0 12px;
  margin: 0;
}

.island-top {
  top: 12px;
  animation: island-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.island-bottom {
  bottom: 14px;
  z-index: 45;
  animation: island-in-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.island-inner {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  max-width: min(560px, calc(100vw - 24px));
  width: auto;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary-color) 45%, transparent);
  background: rgba(6, 1, 24, 0.72);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 24px rgba(33, 255, 199, 0.08);
  transition:
    min-height 0.25s ease,
    padding 0.25s ease,
    gap 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease,
    border-color 0.25s ease,
    max-width 0.25s ease;
}

.island-top.is-compact .island-inner {
  min-height: 36px;
  padding: 4px 12px 4px 8px;
  gap: 8px;
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 16px rgba(33, 255, 199, 0.06);
  border-color: color-mix(in srgb, var(--primary-color) 35%, transparent);
}

/* Composer = mesma casca da ilha, expandida */
.composer-inner {
  width: min(560px, calc(100vw - 24px));
  max-width: min(560px, calc(100vw - 24px));
  padding: 6px 6px 6px 16px;
  gap: 8px;
}

.composer-inner input {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--text-color);
  font: inherit;
  font-size: 0.92rem;
  outline: none;
  padding: 0;
}

.composer-inner input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.composer-send {
  flex-shrink: 0;
  min-height: 36px;
  min-width: 96px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px 0 16px;
  background: var(--primary-color);
  color: var(--accent-color);
  font-weight: 700;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    filter 0.22s ease,
    opacity 0.2s ease;
  box-shadow: 0 0 0 0 rgba(33, 255, 199, 0);
}

.composer-send[hidden],
.composer-mic[hidden] {
  display: none !important;
}

.composer-send::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 45%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0.55s ease;
  z-index: -1;
  pointer-events: none;
}

.composer-send .send-ico {
  display: block;
  flex-shrink: 0;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.composer-send:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 8px 20px rgba(33, 255, 199, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.composer-send:hover::before {
  transform: translateX(120%);
}

.composer-send:hover .send-ico {
  transform: translateX(3px);
  animation: send-nudge 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.composer-send:active {
  transform: translateY(0) scale(0.97);
  box-shadow: none;
}

.composer-send:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.composer-send:disabled:hover .send-ico {
  transform: none;
  animation: none;
}

.composer-send:disabled::before {
  display: none;
}

@keyframes send-nudge {
  0% { transform: translateX(0); }
  40% { transform: translateX(4px); }
  70% { transform: translateX(2px); }
  100% { transform: translateX(3px); }
}

/* Mic WhatsApp-like */
.composer-idle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.composer-idle input {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--text-color);
  font: inherit;
  font-size: 0.92rem;
  outline: none;
  padding: 0;
}

.composer-idle input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.composer-mic {
  flex-shrink: 0;
  width: 40px;
  height: 36px;
  min-width: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: color-mix(in srgb, var(--primary-color) 18%, transparent);
  color: var(--primary-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition:
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.composer-mic:hover {
  background: color-mix(in srgb, var(--primary-color) 28%, transparent);
  transform: translateY(-1px);
}

.composer-mic:active,
.composer-mic[aria-pressed="true"] {
  background: var(--primary-color);
  color: var(--accent-color);
  transform: scale(1.06);
  box-shadow: 0 8px 22px rgba(33, 255, 199, 0.28);
}

.composer-mic:disabled {
  opacity: 0.5;
  cursor: wait;
}

.composer-mic .mic-ico {
  display: block;
  pointer-events: none;
}

/* Estados exclusivos: idle XOR voice */
.voice-recording {
  flex: 1;
  min-width: 0;
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 36px;
}

.voice-recording[hidden] {
  display: none !important;
}

.composer-inner.is-voice-active .voice-recording {
  display: flex;
}

.composer-inner.is-voice-active .voice-recording[hidden] {
  display: flex !important;
}

.composer-inner.is-voice-active .composer-idle {
  display: none !important;
}

.voice-recording-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--error-color);
  flex-shrink: 0;
  animation: voice-pulse 1.1s ease-in-out infinite;
}

.composer-inner.is-voice-paused .voice-dot {
  animation: none;
  opacity: 0.55;
}

@keyframes voice-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.voice-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-color);
  min-width: 2.4em;
}

.voice-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 22px;
  flex-shrink: 0;
}

.composer-inner.is-voice-paused .voice-wave {
  opacity: 0.35;
}

.voice-wave i {
  display: block;
  width: 2px;
  height: 4px;
  border-radius: 2px;
  background: var(--primary-color);
  opacity: 0.85;
  transition: height 0.08s linear;
}

.voice-paused-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.02em;
}

.voice-paused-label[hidden] {
  display: none !important;
}

.voice-hint {
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer-inner.is-voice-holding .voice-hint {
  display: block;
}

.composer-inner.is-voice-locked .voice-hint,
.composer-inner.is-voice-paused .voice-hint {
  display: none;
}

.voice-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-color);
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease, filter 0.2s ease;
}

.voice-btn:hover {
  transform: translateY(-1px);
}

.voice-btn:active {
  transform: scale(0.96);
}

.voice-trash:hover {
  background: color-mix(in srgb, var(--error-color) 28%, transparent);
  color: #ffb4b4;
}

.voice-pause:hover {
  background: rgba(255, 255, 255, 0.14);
}

.composer-inner.is-voice-paused .voice-pause {
  background: color-mix(in srgb, var(--primary-color) 22%, transparent);
  color: var(--primary-color);
}

.voice-lock-send {
  background: var(--primary-color);
  color: var(--accent-color);
}

.voice-lock-send:hover {
  filter: brightness(1.06);
}

.composer-inner.is-voice-holding .voice-trash,
.composer-inner.is-voice-holding .voice-pause,
.composer-inner.is-voice-holding .voice-lock-send {
  display: none;
}

.composer-inner.is-voice-locked .voice-trash,
.composer-inner.is-voice-locked .voice-pause,
.composer-inner.is-voice-locked .voice-lock-send,
.composer-inner.is-voice-paused .voice-trash,
.composer-inner.is-voice-paused .voice-pause,
.composer-inner.is-voice-paused .voice-lock-send {
  display: inline-flex;
}

.composer-inner.is-voice-processing .voice-trash,
.composer-inner.is-voice-processing .voice-pause {
  opacity: 0.4;
  pointer-events: none;
}

.composer-inner.is-voice-cancel {
  border-color: color-mix(in srgb, var(--error-color) 55%, transparent);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.4),
    0 0 0 1px color-mix(in srgb, var(--error-color) 35%, transparent) inset;
}

.composer-inner.is-voice-cancel .voice-dot {
  background: var(--error-color);
  transform: scale(1.15);
}

.composer-inner.is-voice-cancel .voice-hint {
  color: #ffb4b4;
}

.voice-toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(8px);
  z-index: 80;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(12, 8, 28, 0.92);
  color: var(--text-color);
  font-size: 0.82rem;
  line-height: 1.35;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.voice-toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.island-bottom.is-compact .composer-mic {
  height: 32px;
  width: 36px;
  min-width: 36px;
}

.island-bottom.is-compact .voice-btn {
  width: 32px;
  height: 32px;
}

.island-bottom.is-compact .composer-inner {
  min-height: 40px;
  padding: 4px 4px 4px 14px;
}

.island-bottom.is-compact .composer-send {
  min-height: 32px;
  min-width: 80px;
  font-size: 0.82rem;
}

.logo-loggpt {
  height: 22px;
  width: auto;
  flex-shrink: 0;
  display: block;
  opacity: 1;
  transition: height 0.25s ease, opacity 0.25s ease;
}

.logo-event {
  height: 28px;
  width: auto;
  flex-shrink: 0;
  display: block;
  transition: height 0.25s ease;
}

.brand-guide {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  transition: font-size 0.25s ease, color 0.25s ease;
}

.powered-by {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 2px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  min-height: 16px;
}

.powered-by-label {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  white-space: nowrap;
  line-height: 1;
}

.island-brand {
  padding: 8px 16px 8px 12px;
  gap: 12px;
  max-width: min(760px, calc(100vw - 16px));
  box-sizing: border-box;
  overflow: hidden;
}

.island-top.is-compact .logo-loggpt {
  height: 18px;
}

.island-top.is-compact .logo-event {
  height: 22px;
}

.island-top.is-compact .brand-guide {
  font-size: 0.7rem;
}

.island-top.is-compact .powered-by {
  gap: 5px;
  padding-left: 8px;
}

.island-top.is-compact .powered-by-label {
  font-size: 0.52rem;
}

@media (max-width: 420px) {
  .powered-by-label {
    display: none;
  }
  .powered-by {
    padding-left: 8px;
    margin-left: 0;
  }
  .island-brand {
    gap: 8px;
    padding-right: 12px;
  }
}

.island-sep {
  width: 1px;
  height: 16px;
  background: var(--dark-divider-color);
  flex-shrink: 0;
  transition: height 0.25s ease, opacity 0.2s ease;
}

.island-top.is-compact .island-sep {
  height: 12px;
  opacity: 0.7;
}

@keyframes island-in {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes island-in-up {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow-x: hidden;
  overflow-y: auto;
  /* Folga sob o composer fixo (standalone); embed sobrescreve */
  padding: var(--space-2) 10px calc(96px + env(safe-area-inset-bottom, 0px)) 0;
  scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(33, 255, 199, 0.45) transparent;
}

/* Scroll lateral personalizado (WebKit / Chromium / Edge / Safari) */
.stage::-webkit-scrollbar {
  width: 8px;
}

.stage::-webkit-scrollbar-track {
  background: transparent;
  margin: 10px 0;
}

.stage::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(33, 255, 199, 0.55) 0%,
    rgba(33, 255, 199, 0.28) 100%
  );
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 0 10px rgba(33, 255, 199, 0.18);
}

.stage::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(33, 255, 199, 0.85) 0%,
    rgba(33, 255, 199, 0.45) 100%
  );
  background-clip: padding-box;
  box-shadow: 0 0 14px rgba(33, 255, 199, 0.28);
}

.stage::-webkit-scrollbar-thumb:active {
  background: rgba(33, 255, 199, 0.9);
  background-clip: padding-box;
}

.stage::-webkit-scrollbar-corner {
  background: transparent;
}

.msg {
  max-width: 94%;
  padding: var(--space-3) 18px;
  border-radius: var(--radius-md);
  line-height: 1.6;
  animation: fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow: visible;
}

.msg.agent {
  align-self: flex-start;
  width: min(100%, 640px);
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--primary-color) 70%, transparent);
  background: linear-gradient(160deg, rgba(33, 255, 199, 0.08), rgba(6, 1, 24, 0.35));
  box-shadow: 0 0 0 1px rgba(33, 255, 199, 0.04), var(--shadow-soft);
}

.msg.user {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--dark-divider-color);
  white-space: pre-wrap;
}

.msg.loader-msg {
  padding: 20px 18px;
  min-width: 220px;
}

/* Conteudo HTML · Magic UI TextAnimate (vanilla port: by=word/line + blurInUp) */
.rich {
  --ta-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* spring ~0.45s perceptual (Motion generate-css-easing) */
  --ta-spring: linear(
    0,
    0.0523,
    0.1708,
    0.314,
    0.4571,
    0.5866,
    0.6963,
    0.7848,
    0.8534,
    0.9047,
    0.9416,
    0.9673,
    0.9843,
    0.9951,
    1.0014,
    1.0047,
    1.0061,
    1.0062,
    1.0057,
    1.0049,
    1.004,
    1.0031,
    1.0023,
    1.0017,
    1.0012,
    1.0008,
    1
  );
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
}

.rich .block {
  /* bloco só atrasa o grupo; o movimento vive nos .ta-seg */
  opacity: 1;
}

.ta-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-animate {
  margin: 0;
  white-space: pre-wrap;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.58;
  letter-spacing: -0.011em;
}

.text-animate.rich-lead,
.text-animate.lead {
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.97);
  font-weight: 500;
}

.text-animate.rich-p {
  font-size: 0.98rem;
}

.ta-seg {
  display: inline-block;
  white-space: pre;
  opacity: 0;
  will-change: opacity, transform, filter;
  animation-duration: var(--ta-duration, 320ms);
  animation-timing-function: var(--ta-spring);
  animation-fill-mode: forwards;
  animation-delay: calc(var(--ta-delay, 0ms) + (var(--ta-i, 0) * var(--ta-stagger, 28ms)));
}

/* Presets Magic UI */
.text-animate[data-ta-animation="blurInUp"] .ta-seg {
  animation-name: ta-blurInUp;
}

.text-animate[data-ta-animation="blurIn"] .ta-seg {
  animation-name: ta-blurIn;
}

.text-animate[data-ta-animation="slideUp"] .ta-seg {
  animation-name: ta-slideUp;
}

.text-animate[data-ta-animation="fadeIn"] .ta-seg {
  animation-name: ta-fadeIn;
}

.text-animate[data-ta-animation="scaleUp"] .ta-seg {
  animation-name: ta-scaleUp;
}

.rich-title.ta-as-title {
  position: relative;
  display: block;
  max-width: 100%;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.02em;
  line-height: 1.32;
  padding-bottom: 7px;
}

.rich-title.ta-as-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: min(100%, 12rem);
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--primary-color) 0%,
    var(--accent-secondary-color) 55%,
    transparent 100%
  );
  transform: scaleX(0);
  transform-origin: left center;
  animation: ta-underline 0.5s var(--ta-ease) forwards;
  animation-delay: calc(var(--ta-delay, 0ms) + 180ms);
}

.ta-seg.ta-title-seg {
  color: var(--primary-color);
  font-weight: 700;
}

.ta-seg.ta-mark {
  color: var(--primary-color);
  font-weight: 700;
  letter-spacing: 0.01em;
  background: linear-gradient(
    180deg,
    transparent 62%,
    rgba(33, 255, 199, 0.22) 62%,
    rgba(33, 255, 199, 0.22) 92%,
    transparent 92%
  );
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  animation-name: ta-scaleUp;
}

.ta-seg.ta-em {
  color: var(--accent-secondary-color);
  font-style: normal;
  font-weight: 600;
}

.rich-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.rich-list li.ta-li {
  position: relative;
  padding-left: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.45;
  opacity: 0;
  animation: ta-slideUp 0.4s var(--ta-ease) forwards;
  animation-delay: var(--ta-delay, 0ms);
}

.rich-list li.ta-li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 0 0 0 rgba(33, 255, 199, 0.35);
  animation: ta-dot-pulse 1.8s var(--ta-ease) infinite;
  animation-delay: calc(var(--ta-delay, 0ms) + 0.35s);
}

.ta-li-inner {
  display: inline;
}

.rich a {
  color: var(--primary-color);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1.5px;
  transition: background-size 0.35s var(--ta-ease);
}

.rich a:hover {
  background-size: 100% 1.5px;
}

@keyframes ta-blurInUp {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes ta-blurIn {
  from {
    opacity: 0;
    filter: blur(10px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes ta-slideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ta-fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ta-scaleUp {
  from {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(10px) scale(0.92);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes ta-underline {
  from {
    transform: scaleX(0);
    opacity: 0.4;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes ta-dot-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(33, 255, 199, 0.35);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(33, 255, 199, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ta-seg,
  .rich-list li.ta-li,
  .rich-title.ta-as-title::after,
  .rich-list li.ta-li::before {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .rich-title.ta-as-title::after {
    transform: scaleX(1) !important;
  }
}

.related {
  display: none !important;
}

/* Preview visual da agenda (substitui pills de patrocinador) */
.agenda-preview {
  margin-top: 14px;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(165deg, #0c0824 0%, #060118 55%, #04010f 100%);
  border: 1px solid rgba(33, 255, 199, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: fade-up 0.45s ease both;
}

.agenda-preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.agenda-preview-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-color);
}

.agenda-preview-brand {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
}

.agenda-preview-list {
  list-style: none;
  margin: 0;
  padding: 6px 0 8px;
}

.agenda-preview-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  padding: 10px 14px;
  align-items: start;
}

.agenda-preview-row + .agenda-preview-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.agenda-preview-row time {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-color);
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
}

.agenda-preview-row strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.agenda-preview-row span {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.35;
}

/* Carrossel de solu??es + FAB estandes */
.sponsor-carousel {
  margin-top: 14px;
  width: 100%;
  max-width: 100%;
}

.sponsor-carousel-cta {
  margin: 0 0 10px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(33, 255, 199, 0.92);
}

.sponsor-carousel-cta strong { color: #fff; }

.sponsor-carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(33, 255, 199, 0.45) transparent;
}

.sponsor-card {
  flex: 0 0 min(78%, 260px);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse 70% 80% at 12% 40%, rgba(33, 255, 199, 0.07), transparent 55%),
    linear-gradient(165deg, #0c0824 0%, #060118 55%, #04010f 100%);
  border: 1px solid rgba(33, 255, 199, 0.22);
  animation: fade-up 0.45s ease both;
}

.sponsor-card-logo {
  width: 100%;
  aspect-ratio: 1.4 / 1;
  max-height: 110px;
  border-radius: 14px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(33, 255, 199, 0.28);
}

.sponsor-card-logo img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.sponsor-card-name { margin: 0; font-size: 1rem; color: #fff; }

.sponsor-card-blurb {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.62);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sponsor-card-stand,
.sponsor-card-visit {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(33, 255, 199, 0.9);
  font-weight: 600;
}

/* Lista vertical de solu??es (embed / buscador) */
.sponsor-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.sponsor-list-cta {
  margin: 0 0 2px;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(33, 255, 199, 0.92);
}

.sponsor-list-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background:
    radial-gradient(ellipse 70% 80% at 8% 30%, rgba(33, 255, 199, 0.08), transparent 55%),
    linear-gradient(165deg, #0c0824 0%, #060118 55%, #04010f 100%);
  border: 1px solid rgba(33, 255, 199, 0.22);
  animation: fade-up 0.4s ease both;
}

.sponsor-list-item.is-featured {
  grid-template-columns: 76px 1fr;
  padding: 14px;
  border-color: rgba(33, 255, 199, 0.55);
  box-shadow:
    0 0 0 1px rgba(33, 255, 199, 0.12),
    0 12px 32px rgba(0, 0, 0, 0.35);
  background:
    radial-gradient(ellipse 80% 90% at 10% 20%, rgba(33, 255, 199, 0.16), transparent 55%),
    linear-gradient(165deg, #10102e 0%, #060118 55%, #04010f 100%);
}

.sponsor-list-item.is-featured .sponsor-list-logo {
  width: 76px;
  height: 76px;
}

.sponsor-list-kicker {
  margin: 0 0 2px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
}

.sponsor-list-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sponsor-list-more {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.sponsor-list-more[hidden] {
  display: none !important;
}

.sponsor-list-more-btn {
  appearance: none;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(33, 255, 199, 0.4);
  background: rgba(33, 255, 199, 0.08);
  color: var(--primary-color);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.sponsor-list-more-btn:hover {
  background: rgba(33, 255, 199, 0.16);
}

.sponsor-list-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(33, 255, 199, 0.28);
  font-size: 1.25rem;
  font-weight: 700;
  color: #060118;
}

.sponsor-list-logo.is-fallback {
  background: rgba(33, 255, 199, 0.12);
  color: var(--primary-color);
  border-color: rgba(33, 255, 199, 0.4);
}

.sponsor-list-logo img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.sponsor-list-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sponsor-list-name {
  margin: 0;
  font-size: 0.95rem;
  color: #fff;
}

.sponsor-list-blurb {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.62);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sponsor-list-meta {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(33, 255, 199, 0.9);
}

.sponsor-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.sponsor-action {
  appearance: none;
  border: 1px solid rgba(33, 255, 199, 0.45);
  background: transparent;
  color: var(--primary-color);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 32px;
}

.sponsor-action:hover,
.sponsor-action:focus-visible {
  background: rgba(33, 255, 199, 0.12);
  outline: none;
}

.sponsor-action.is-primary {
  background: rgba(33, 255, 199, 0.16);
  border-color: rgba(33, 255, 199, 0.7);
  color: #fff;
}

.sponsor-action:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Overlay simula??o de rota */
.route-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(16px + var(--embed-pad-y) + env(safe-area-inset-top, 0px))
    calc(16px + var(--embed-pad-x) + env(safe-area-inset-right, 0px))
    calc(16px + var(--embed-pad-y) + env(safe-area-inset-bottom, 0px))
    calc(16px + var(--embed-pad-x) + env(safe-area-inset-left, 0px));
  background: rgba(4, 1, 15, 0.72);
  backdrop-filter: blur(8px);
}

.route-overlay[hidden] { display: none !important; }

.route-panel {
  width: min(560px, 100%);
  max-height: 100%;
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(33, 255, 199, 0.28);
  background: linear-gradient(165deg, #0c0824 0%, #060118 60%, #04010f 100%);
  padding: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.route-panel.is-fullscreen {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 16px;
}

.route-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.route-kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(33, 255, 199, 0.85);
  font-weight: 600;
}

.route-title {
  margin: 4px 0 0;
  font-size: 1.15rem;
  color: #fff;
}

.route-close {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.route-note {
  margin: 10px 0 12px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.4;
}

.route-overlay.is-map-enter .route-panel {
  animation: map-sheet-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes map-sheet-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.route-stage {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 20% 18%, rgba(33, 255, 199, 0.12), transparent 42%),
    var(--bg-secondary-color, #050214);
  min-height: 280px;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.map-scene {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 280px;
  overflow: hidden;
  background: var(--bg-secondary-color, #050214);
  touch-action: none;
  cursor: grab;
}

.map-scene:active {
  cursor: grabbing;
}

.map-scene[hidden] {
  display: none !important;
}

.map-scene-viewport {
  position: absolute;
  inset: 0;
  transform-origin: center center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.map-scene-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.map-atmosphere {
  fill: #07111f;
}

.map-atmosphere-iso {
  fill: #07111f;
}

.map-floor-iso {
  opacity: 1;
  filter: none;
}

.map-floor-ghost {
  opacity: 0.78;
  filter: saturate(0.9) brightness(1.18) contrast(1.08);
}

.map-shell {
  fill: none;
  stroke: rgba(33, 255, 199, 0.35);
  stroke-width: 2;
}

.map-zone {
  fill: rgba(33, 255, 199, 0.08);
  stroke: rgba(33, 255, 199, 0.35);
  stroke-width: 1.5;
}

.map-zone-stage {
  fill: rgba(58, 250, 86, 0.07);
  stroke: rgba(58, 250, 86, 0.4);
}

.map-zone-entry {
  fill: rgba(33, 255, 199, 0.14);
  stroke: var(--primary-color, #21ffc7);
}

.map-scene[data-lod="far"] .map-zone-label {
  opacity: 0.35;
  font-size: 9px;
}

.map-scene[data-lod="near"] .map-zone-label {
  opacity: 1;
  font-size: 12px;
}

.map-landmark-entrada {
  fill: var(--primary-color, #21ffc7);
  stroke: #fff;
  stroke-width: 2;
}

.map-path-base {
  fill: none;
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 3;
  stroke-dasharray: 6 6;
}

.map-path-active {
  fill: none;
  stroke: var(--primary-color, #21ffc7);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-path-avatar {
  fill: var(--primary-color, #21ffc7);
  stroke: #060118;
  stroke-width: 2;
}

.map-scene-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map-pin {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  transform-origin: 50% 100%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  z-index: 2;
  transition: filter 0.2s ease, opacity 0.2s ease;
  will-change: transform;
}

.map-pin.is-collapsed {
  display: none !important;
}

.map-pin-face {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #0b1228;
  border: 2px solid rgba(33, 255, 199, 0.55);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  color: var(--primary-color, #21ffc7);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  transition: width 0.2s ease, height 0.2s ease, border-radius 0.2s ease;
}

.map-pin-face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.map-pin-num {
  display: block;
  margin-top: 2px;
  text-align: center;
  font-size: 0.58rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 2px #000;
}

.map-scene[data-lod="far"] .map-pin-face {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border-width: 1.5px;
}

.map-scene[data-lod="far"] .map-pin-face img,
.map-scene[data-lod="far"] .map-pin-num {
  display: none !important;
}

.map-scene[data-lod="far"] .map-pin-face.is-fallback {
  font-size: 0;
  color: transparent;
}

.map-scene[data-lod="far"] .map-pin.is-related .map-pin-face,
.map-scene[data-lod="far"] .map-pin.is-destination .map-pin-face {
  width: 22px;
  height: 22px;
  border-radius: 8px;
}

.map-scene[data-lod="far"] .map-pin.is-related .map-pin-face img,
.map-scene[data-lod="far"] .map-pin.is-destination .map-pin-face img {
  display: block !important;
}

.map-scene[data-lod="mid"] .map-pin-face {
  width: 28px;
  height: 28px;
  border-radius: 10px;
}

.map-scene[data-lod="mid"] .map-pin-num {
  display: none;
}

.map-scene[data-lod="near"] .map-pin-face {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.map-pin.is-related .map-pin-face {
  border-color: var(--accent-secondary-color, #3afa56);
}

.map-pin.is-destination {
  z-index: 5;
}

.map-pin.is-destination .map-pin-face {
  border-color: var(--primary-color, #21ffc7);
  box-shadow: 0 0 0 3px rgba(33, 255, 199, 0.35), 0 8px 20px rgba(0, 0, 0, 0.5);
}

.map-pin.is-dimmed {
  opacity: 0.22;
  filter: grayscale(0.65);
}

.route-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 10px 10px;
}

.route-dot {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.route-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.route-dot-start { color: var(--primary-color); }
.route-dot-path { color: rgba(255, 255, 255, 0.55); }
.route-dot-end { color: var(--accent-secondary-color); }

.route-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.route-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(33, 255, 199, 0.9);
  color: #060118;
  min-height: 40px;
}

.route-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
}

body.route-open {
  overflow: hidden;
}

.sponsor-carousel-foot {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.sponsor-carousel-all {
  appearance: none;
  border: 1px solid rgba(33, 255, 199, 0.35);
  background: rgba(33, 255, 199, 0.08);
  color: #21ffc7;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.sponsor-carousel-all:hover { background: rgba(33, 255, 199, 0.16); }

.sponsor-sections,
.stand-stack,
.stand-swiper,
.swiper,
.related { display: none !important; }

.stands-fab {
  position: fixed;
  right: 12px;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(33, 255, 199, 0.4);
  background: linear-gradient(165deg, #0c1a2e, #060118);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.stands-fab[hidden] { display: none !important; }
.stands-fab svg { color: #21ffc7; }

.stands-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 50;
}
.stands-backdrop[hidden] { display: none !important; }

.stands-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(100vw, 380px);
  height: 100%;
  z-index: 60;
  background: linear-gradient(180deg, #0c1a2e 0%, #060118 100%);
  color: #fff;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  padding: 16px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}
.stands-drawer[hidden] { display: none !important; }

.stands-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.stands-drawer-kicker {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #21ffc7;
}
.stands-drawer-title { margin: 4px 0 0; font-size: 1.25rem; }
.stands-drawer-close {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.stands-drawer-note {
  margin: 10px 0 12px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}
.stands-map-wrap {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(33, 255, 199, 0.35);
  background: #0c1a2e;
  cursor: pointer;
  text-align: left;
}
.stands-map-wrap img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 140px;
  object-fit: contain;
  background: #fff;
}
.stands-map-cta {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(6, 1, 24, 0.82);
  color: var(--primary-color, #21ffc7);
  font-size: 0.72rem;
  font-weight: 700;
  pointer-events: none;
}

.official-map-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(2, 0, 12, 0.72);
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
}
.official-map-overlay[hidden] { display: none !important; }
.official-map-panel {
  width: min(960px, 100%);
  height: min(92vh, 920px);
  display: flex;
  flex-direction: column;
  background: #0a071f;
  border: 1px solid rgba(33, 255, 199, 0.28);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.official-map-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 0;
}
.official-map-kicker {
  margin: 0;
  color: var(--primary-color, #21ffc7);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.official-map-title {
  margin: 4px 0 0;
  font-size: 1.2rem;
}
.official-map-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.official-map-note {
  margin: 6px 16px 10px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}
.official-map-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #111;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.official-map-scroll img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  min-width: 100%;
  background: #fff;
}
.official-map-actions {
  display: flex;
  gap: 10px;
  padding: 12px 16px 14px;
}
body.official-map-open { overflow: hidden; }
.stands-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.stands-search {
  margin-top: 12px;
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 10px 12px;
  font: inherit;
}
.stands-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  overflow-y: auto;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stands-list-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.stands-list-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.stands-list-logo img { width: 78%; height: 78%; object-fit: contain; }
.stands-list-body strong { display: block; font-size: 0.88rem; }
.stands-list-body span {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: rgba(33, 255, 199, 0.85);
}
body.stands-open { overflow: hidden; }
@media (min-width: 720px) {
  .stands-fab {
    right: 20px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
  .sponsor-card { flex-basis: 240px; }
}

/* Loader favicon + anel */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 6px 0 2px;
}

.loader-orbit {
  position: relative;
  width: 72px;
  height: 72px;
}

.loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(33, 255, 199, 0.15);
  border-top-color: var(--primary-color);
  border-right-color: color-mix(in srgb, var(--accent-secondary-color) 80%, transparent);
  animation: spin 0.95s linear infinite;
}

.loader-ring::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(33, 255, 199, 0.12);
  border-bottom-color: var(--accent-secondary-color);
  animation: spin 1.4s linear infinite reverse;
}

.loader-core {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: #000;
  border: 1px solid rgba(33, 255, 199, 0.25);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 6px;
}

.loader-core img {
  width: 72%;
  height: auto;
  max-height: 26px;
  object-fit: contain;
  animation: soft-pulse 1.6s ease-in-out infinite;
}

.loader-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-color);
  top: 50%;
  left: 50%;
  transform-origin: 0 0;
  animation: orbit 1.6s linear infinite;
  box-shadow: 0 0 10px var(--primary-color);
}

.loader-spark:nth-child(2) { animation-delay: -0.4s; background: var(--accent-secondary-color); }
.loader-spark:nth-child(3) { animation-delay: -0.8s; }

.loader-status {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.02em;
  min-height: 1.2em;
  text-align: center;
  animation: status-fade 0.35s ease;
}

/* legacy composer block removido: agora e .island-bottom */

/* Home: mensagem + possibilidades separadas */
.welcome {
  max-width: 92%;
}

.path-board {
  align-self: stretch;
  width: min(100%, 560px);
  margin: 4px 0 8px;
  padding: 14px 14px 12px;
  border-radius: 22px;
  background:
    radial-gradient(ellipse 80% 70% at 0% 0%, rgba(33, 255, 199, 0.1), transparent 55%),
    linear-gradient(165deg, rgba(12, 8, 36, 0.92) 0%, rgba(6, 1, 24, 0.75) 100%);
  border: 1px solid rgba(33, 255, 199, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: fade-up 0.5s ease both;
}

.path-board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.path-board-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
}

.path-board-hint {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
}

.path-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.path-chip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-color);
  border-radius: 999px;
  padding: 12px 14px 12px 12px;
  cursor: pointer;
  font-family: inherit;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.18s ease,
    box-shadow 0.2s ease;
  animation: fade-up 0.45s ease both;
}

.path-chip:hover,
.path-chip:focus-visible {
  outline: none;
  border-color: rgba(33, 255, 199, 0.5);
  background: rgba(33, 255, 199, 0.08);
  transform: translateX(4px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.path-chip:active {
  transform: translateX(2px) scale(0.99);
}

.path-chip-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #060118;
  background: linear-gradient(145deg, #21ffc7 0%, #3afa56 100%);
  box-shadow: 0 0 0 1px rgba(33, 255, 199, 0.35);
}

.path-chip-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.path-chip-copy strong {
  font-size: 0.9rem;
  font-weight: 650;
  color: #fff;
  line-height: 1.25;
}

.path-chip-copy span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.35;
}

.path-chip-go {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--primary-color);
  background: rgba(33, 255, 199, 0.1);
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.path-chip:hover .path-chip-go {
  background: rgba(33, 255, 199, 0.2);
  transform: translateX(2px);
}

@media (max-width: 520px) {
  .path-chip {
    border-radius: 18px;
    align-items: flex-start;
    padding: 12px;
  }

  .path-chip-mark {
    margin-top: 2px;
  }

  .path-board-hint {
    display: none;
  }
}

/* legacy (n?o usado) */
.intents,
.intent-card {
  display: none !important;
}

/* Pergunta inline: destaque diferente da resposta normal */
.ask-prompt {
  align-self: stretch;
  width: min(100%, 560px);
  margin: 6px 0 10px;
  padding: 16px 16px 14px;
  border-radius: 20px;
  border: 1px solid rgba(33, 255, 199, 0.35);
  background:
    radial-gradient(ellipse 90% 80% at 100% 0%, rgba(33, 255, 199, 0.14), transparent 52%),
    linear-gradient(165deg, #0c1a2e 0%, #060118 48%, #04010f 100%);
  box-shadow:
    0 0 0 1px rgba(33, 255, 199, 0.08) inset,
    0 12px 28px rgba(0, 0, 0, 0.28);
  animation: fade-up 0.4s ease both;
}

.ask-prompt.is-answered {
  opacity: 0.55;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
  pointer-events: none;
}

.ask-prompt-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ask-prompt-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
}

.ask-prompt.is-answered .ask-prompt-kicker {
  color: rgba(255, 255, 255, 0.45);
}

.ask-prompt-hint {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
}

.ask-prompt-q {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
}

.ask-prompt-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ask-opt {
  border: 1px solid rgba(33, 255, 199, 0.35);
  background: rgba(33, 255, 199, 0.08);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.ask-opt:hover {
  border-color: var(--primary-color);
  background: rgba(33, 255, 199, 0.16);
  transform: translateY(-1px);
}

.ask-prompt-free {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
}

.ask-prompt-free input {
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(33, 255, 199, 0.4);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  padding: 0 14px;
  font: inherit;
  outline: none;
}

.ask-prompt-free input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(33, 255, 199, 0.12);
}

.ask-prompt-send {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--primary-color);
  color: #060118;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.ask-prompt-send:hover {
  filter: brightness(1.08);
  transform: scale(1.04);
}

.ask-prompt-skip {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}

/* Overlay antigo removido */
.answer-focus,
body.focus-mode .island-bottom,
body.focus-mode .stage {
  display: none !important;
}

.pdf-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.pdf-btn {
  border: 1px solid var(--primary-color);
  background: rgba(33, 255, 199, 0.1);
  color: var(--primary-color);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes soft-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes orbit {
  from { transform: rotate(0deg) translateX(30px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(30px) rotate(-360deg); }
}

@keyframes status-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 600px) {
  .shell { padding: 64px 12px 88px; }
  .msg { max-width: 100%; }
  .logo-event { max-width: 38vw; }
  .composer-send { min-width: 76px; padding: 0 12px; }
  .ask-prompt-q { font-size: 0.98rem; }
}

/* Telefone / mock / viewports estreitos */
@media (max-width: 390px) {
  .shell {
    padding: 58px 10px 78px;
    gap: 10px;
  }
  .island {
    padding: 0 8px;
  }
  .island-top { top: 8px; }
  .island-bottom { bottom: 8px; }
  .island-brand {
    gap: 8px;
    padding: 6px 10px 6px 8px;
    max-width: calc(100vw - 16px);
  }
  .logo-event { height: 20px; max-width: 34vw; }
  .brand-guide { font-size: 0.68rem; }
  .powered-by { display: none; }
  .composer-inner {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    padding: 5px 5px 5px 12px;
  }
  .composer-inner input {
    font-size: 0.86rem;
  }
  .composer-send {
    min-width: 68px;
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.78rem;
  }
  .composer-send .send-ico { width: 14px; height: 14px; }
  .msg {
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 0.92rem;
  }
  .sponsor-rail {
    margin-left: -4px;
    margin-right: -4px;
    padding-left: 4px;
  }
}

@media (max-width: 320px) {
  .brand-guide { display: none; }
  .island-sep { display: none; }
  .shell { padding: 52px 8px 72px; }
  .composer-send span { display: none; }
  .composer-send { min-width: 40px; padding: 0; }
}

/* Embed no app host (iframe / ?embed=1) - safe-area + Powered by LogGPT
   --host-chrome-* = chrome nativo do app (titulo + tabs), via postMessage layout */
html.is-embed,
body.is-embed {
  --embed-inset: 10px;
  --host-chrome-top: 0px;
  --host-chrome-bottom: 0px;
  --embed-pad-x: max(12px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --embed-pad-y: max(8px, env(safe-area-inset-top, 0px), env(safe-area-inset-bottom, 0px));
  --composer-clearance: calc(100px + var(--host-chrome-bottom) + env(safe-area-inset-bottom, 0px));
  background-clip: padding-box;
  border: var(--embed-inset) solid #02000c;
  box-sizing: border-box;
}

body.is-embed .shell {
  padding:
    calc(54px + var(--embed-pad-y) + var(--host-chrome-top))
    calc(12px + var(--embed-pad-x))
    var(--composer-clearance);
  max-width: 100%;
}

body.is-embed .stage {
  padding-bottom: calc(24px + var(--composer-clearance));
  scroll-padding-bottom: calc(24px + var(--composer-clearance));
}

body.is-embed .island {
  padding: 0 calc(10px + var(--embed-pad-x));
}

body.is-embed .island-top {
  top: calc(6px + env(safe-area-inset-top, 0px) + var(--host-chrome-top));
}

body.is-embed .island-bottom {
  bottom: calc(6px + env(safe-area-inset-bottom, 0px) + var(--host-chrome-bottom));
}

body.is-embed .island-brand {
  gap: 8px;
  padding: 7px 12px 7px 10px;
  max-width: calc(100vw - 2 * var(--embed-inset) - 2 * var(--embed-pad-x) - 4px);
  width: auto;
  box-sizing: border-box;
  overflow: hidden;
}

/* Powered by LogGPT permanece visível no embed (compacto) */
body.is-embed .powered-by {
  display: inline-flex;
  gap: 5px;
  padding-left: 8px;
  margin-left: 0;
  flex-shrink: 0;
}

body.is-embed .powered-by-label {
  display: none;
}

body.is-embed .logo-loggpt {
  height: 18px;
  flex-shrink: 0;
}

body.is-embed .brand-guide {
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.is-embed .logo-event {
  height: 18px;
  max-width: 28vw;
}

body.is-embed .composer-inner {
  width: calc(100vw - 2 * var(--embed-inset) - 2 * var(--embed-pad-x) - 8px);
  max-width: calc(100vw - 2 * var(--embed-inset) - 2 * var(--embed-pad-x) - 8px);
}

body.is-embed .composer-send span { display: none; }

body.is-embed .composer-send,
body.is-embed .composer-mic {
  min-width: 40px;
  min-height: 34px;
  padding: 0;
}

body.is-embed .voice-toast {
  bottom: calc(92px + env(safe-area-inset-bottom, 0px) + var(--embed-inset, 0px));
}

body.is-embed .stands-fab {
  right: calc(12px + var(--embed-pad-x));
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  padding: 8px 12px;
  font-size: 0.72rem;
}

body.is-embed .msg {
  max-width: 100%;
  font-size: 0.9rem;
  line-height: 1.45;
  padding: 12px 13px;
}

body.is-embed .msg.agent .rich {
  gap: 0.7rem;
}

body.is-embed .rich-title {
  font-size: 1.02rem;
}

body.is-embed .ta-seg.ta-mark {
  color: var(--primary-color);
  font-weight: 700;
}

body.is-embed .rich-lead,
body.is-embed .rich-p,
body.is-embed .rich-list li {
  color: rgba(255, 255, 255, 0.94);
}

body.is-map-view .map-island-thread .rich {
  gap: 0.72rem;
}

body.is-map-view .map-island-thread .rich-title {
  font-size: 1.08rem;
}

body.is-map-view .map-island-thread .rich-lead,
body.is-map-view .map-island-thread .rich-p,
body.is-map-view .map-island-thread .rich-list li {
  color: rgba(255, 255, 255, 0.94);
  line-height: 1.55;
}

body.is-map-view .map-island-thread .ta-seg.ta-mark {
  color: var(--primary-color);
}

body.is-embed .sponsor-list {
  margin-top: 10px;
}

body.is-embed .sponsor-list-item {
  grid-template-columns: 56px 1fr;
  padding: 11px;
}

body.is-embed .sponsor-list-logo {
  width: 56px;
  height: 56px;
}

body.is-embed .sponsor-list-name {
  font-size: 0.92rem;
  line-height: 1.25;
}

body.is-embed .sponsor-list-blurb {
  font-size: 0.8rem;
  line-height: 1.35;
}

body.is-map-view.is-embed .map-island-shell {
  bottom: calc(6px + env(safe-area-inset-bottom, 0px) + var(--host-chrome-bottom));
}

/* Ilha superior no mapa: mais larga para o LogGPT não sair da cápsula */
body.is-map-view .island-top {
  padding: 0 6px;
  z-index: 50;
}

body.is-map-view .island-brand {
  max-width: calc(100vw - 12px);
  padding: 7px 14px 7px 10px;
  gap: 10px;
}

body.is-map-view.is-embed .island-top {
  padding: 0 calc(6px + var(--embed-pad-x));
}

body.is-map-view.is-embed .island-brand {
  max-width: calc(100vw - 2 * var(--embed-inset) - 2 * var(--embed-pad-x) - 2px);
  padding: 7px 12px 7px 10px;
}

body.is-map-view .powered-by {
  display: inline-flex;
  flex-shrink: 0;
}

body.is-map-view .logo-loggpt {
  flex-shrink: 0;
}

body.is-map-view .brand-guide {
  min-width: 0;
  max-width: 34vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.is-map-view.is-embed .stand-sheet {
  bottom: calc(78px + env(safe-area-inset-bottom, 0px) + var(--host-chrome-bottom));
}

body.is-map-view.is-embed .map-controls {
  top: calc(64px + env(safe-area-inset-top, 0px) + var(--host-chrome-top));
}

/* ?? Mapa p?gina dedicada ?? */
body.is-map-view {
  overflow: hidden;
}

body.is-map-view .shell {
  display: none !important;
}

body.is-map-view .stands-fab {
  display: none !important;
}

.map-page {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #050214;
}

.map-page[hidden] {
  display: none !important;
}

body.is-map-view .map-page {
  display: block;
}

body.is-map-view .map-page .map-scene {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  min-height: 0;
}

.map-back-chat {
  margin-left: auto;
  margin-right: 8px;
  color: var(--primary-color);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(33, 255, 199, 0.35);
  display: none;
}

body.is-map-view .map-back-chat {
  display: inline-flex;
}

body.is-map-view .brand-guide {
  font-size: 0.78rem;
}

.stand-sheet {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 44px 14px 14px;
  border-radius: 18px;
  border: 1px solid rgba(33, 255, 199, 0.28);
  background: linear-gradient(165deg, rgba(12, 8, 36, 0.96), rgba(6, 1, 24, 0.98));
  box-shadow: var(--shadow-soft);
  animation: map-sheet-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stand-sheet[hidden] {
  display: none !important;
}

.stand-sheet-close {
  position: absolute;
  top: 8px;
  right: 8px;
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.stand-sheet-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.4rem;
}

.stand-sheet-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.stand-sheet-title {
  margin: 0;
  font-size: 1.05rem;
  color: #fff;
}

.stand-sheet-meta {
  margin: 4px 0 10px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
}

.stand-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-island-shell {
  display: contents;
}

body.is-map-view #composerIsland {
  z-index: 40;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  padding: 0;
  justify-content: center;
}

body.is-map-view #composerIsland .map-island-shell {
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  gap: 0;
  pointer-events: auto;
}

/* Idle no mapa: mant?m a casca pill do composer */
body.is-map-view #composerIsland[data-island-state="idle"] .composer-inner {
  width: 100%;
  max-width: 100%;
}

/* Ask / reply / results: card ?nico, sem pill quebrada */
body.is-map-view #composerIsland[data-island-state="ask"] .map-island-shell,
body.is-map-view #composerIsland[data-island-state="reply"] .map-island-shell,
body.is-map-view #composerIsland[data-island-state="results"] .map-island-shell,
body.is-map-view #composerIsland[data-island-state="searching"] .map-island-shell {
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(33, 255, 199, 0.32);
  background: rgba(6, 1, 24, 0.94);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  gap: 10px;
}

body.is-map-view #composerIsland[data-island-state="ask"] .composer-inner,
body.is-map-view #composerIsland[data-island-state="reply"] .composer-inner,
body.is-map-view #composerIsland[data-island-state="results"] .composer-inner,
body.is-map-view #composerIsland[data-island-state="searching"] .composer-inner {
  width: 100%;
  max-width: none;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.is-map-view #composerIsland[data-island-state="ask"] .composer-idle,
body.is-map-view #composerIsland[data-island-state="reply"] .composer-idle,
body.is-map-view #composerIsland[data-island-state="results"] .composer-idle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 4px 4px 4px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.map-island-chrome {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0 0 2px;
}

.map-island-chrome[hidden] {
  display: none !important;
}

.map-island-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(33, 255, 199, 0.28);
  background: rgba(33, 255, 199, 0.08);
  color: var(--primary-color);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  min-height: 32px;
}

.map-island-toggle:hover {
  background: rgba(33, 255, 199, 0.14);
  border-color: rgba(33, 255, 199, 0.45);
}

.map-island-chevron {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  opacity: 0.85;
  transition: transform 0.2s ease;
}

#composerIsland[data-island-collapsed="1"] .map-island-chevron {
  transform: rotate(-90deg);
}

.map-island-results {
  width: 100%;
  max-height: 168px;
  overflow: auto;
  padding: 0;
}

.map-island-results[hidden],
.map-island-reply[hidden],
.map-ask-chip[hidden] {
  display: none !important;
}

/* Colapsado: mantém o conteúdo no DOM, só esconde o painel para ver o mapa */
body.is-map-view #composerIsland[data-island-collapsed="1"] .map-island-reply,
body.is-map-view #composerIsland[data-island-collapsed="1"] .map-island-results {
  display: none !important;
}

body.is-map-view #composerIsland[data-island-collapsed="1"] .map-island-shell {
  padding: 8px 10px;
  gap: 8px;
  border-radius: 18px;
}

body.is-map-view #composerIsland[data-island-collapsed="1"] .composer-inner {
  width: 100%;
  max-width: none;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 4px 4px 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

body.is-map-view #composerIsland[data-island-collapsed="1"] .composer-idle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
}

body.is-map-view #composerIsland[data-island-collapsed="1"] .map-island-chrome {
  justify-content: center;
  margin: 0;
}

body.is-map-view #composerIsland[data-island-collapsed="1"] .map-island-toggle {
  width: 100%;
  justify-content: center;
}

.map-island-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-island-list button {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
}

.map-island-list button:hover {
  border-color: rgba(33, 255, 199, 0.35);
}

.map-island-list strong {
  display: block;
  font-size: 0.88rem;
}

.map-island-list span {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
}

.map-island-empty {
  margin: 4px 2px 8px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

.map-island-reply {
  padding: 0;
  border: 0;
  background: transparent;
  max-height: none;
  overflow: visible;
}

.map-island-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(48vh, 400px);
  overflow: auto;
  padding: 4px 2px 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(33, 255, 199, 0.35) transparent;
}

.map-island-thread .msg {
  max-width: 100%;
  animation: fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.map-island-thread .msg.agent {
  align-self: stretch;
  width: 100%;
  padding: var(--space-3) 16px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--primary-color) 70%, transparent);
  background: linear-gradient(160deg, rgba(33, 255, 199, 0.08), rgba(6, 1, 24, 0.35));
  box-shadow: 0 0 0 1px rgba(33, 255, 199, 0.04), var(--shadow-soft);
  line-height: 1.55;
  font-size: 0.95rem;
}

.map-island-thread .msg.user {
  align-self: flex-end;
  max-width: 92%;
  width: auto;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--dark-divider-color);
  white-space: pre-wrap;
  font-size: 0.92rem;
}

.map-island-thread .loader-core img {
  max-height: 28px;
}

.map-ask-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 8px 5px 10px;
  border-radius: 999px;
  background: rgba(33, 255, 199, 0.12);
  border: 1px solid rgba(33, 255, 199, 0.35);
  color: var(--primary-color);
  font-size: 0.72rem;
  font-weight: 600;
  align-self: flex-start;
}

.map-ask-chip-clear {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
}

body.is-map-view .stand-sheet {
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  transition: opacity 0.25s ease, transform 0.25s ease;
}

body.is-map-view .stand-sheet.is-tucked {
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  visibility: hidden;
}

.map-scene.is-panning .map-scene-viewport {
  transition: none !important;
}

.map-page-status {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  z-index: 5;
  margin: 0;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(33, 255, 199, 0.28);
  background: rgba(6, 1, 24, 0.82);
  color: rgba(241, 255, 238, 0.9);
  font-size: 0.85rem;
  pointer-events: none;
}

.map-page-status[hidden] {
  display: none !important;
}

body.is-map-view .map-page.is-ready .map-page-status {
  display: none !important;
}

/* Controles flutuantes do mapa */
.map-controls {
  position: absolute;
  right: 12px;
  top: calc(84px + env(safe-area-inset-top, 0px));
  z-index: 28;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  pointer-events: none;
}

.map-controls .map-ctrl,
.map-controls .map-ctrl-zoom {
  pointer-events: auto;
}

.map-ctrl {
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(33, 255, 199, 0.35);
  background: rgba(6, 1, 24, 0.88);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.map-ctrl:hover {
  border-color: rgba(33, 255, 199, 0.7);
  background: rgba(12, 8, 36, 0.95);
}

.map-ctrl:active {
  transform: scale(0.96);
}

.map-ctrl-zoom {
  margin-top: 2px;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(33, 255, 199, 0.9);
  padding: 4px 0;
  min-width: 40px;
  user-select: none;
}

body.is-embed .map-controls {
  top: calc(72px + env(safe-area-inset-top, 0px));
  right: calc(10px + var(--embed-pad-x, 0px));
}

body.is-guide-locked .shell,
body.is-guide-locked .map-page,
body.is-guide-locked .island-bottom,
body.is-guide-locked .stands-fab,
body.is-guide-locked .stands-drawer,
body.is-guide-locked .stands-backdrop,
body.is-guide-locked .official-map-overlay {
  visibility: hidden;
  pointer-events: none;
}

.guide-logout {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  margin-left: 4px;
}
.guide-logout:hover {
  background: rgba(33, 255, 199, 0.16);
  color: var(--primary-color);
}

.guide-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    linear-gradient(160deg, rgba(6, 1, 24, 0.92), rgba(6, 1, 24, 0.86));
}
.guide-gate[hidden] {
  display: none;
}
.guide-gate-card {
  width: min(420px, 100%);
  padding: 28px 22px 24px;
  border-radius: 22px;
  background: rgba(12, 8, 36, 0.92);
  border: 1px solid rgba(33, 255, 199, 0.22);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.guide-gate-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-color);
  font-weight: 600;
}
.guide-gate-card h1 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.guide-gate-card p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
  font-size: 0.92rem;
}
.guide-gate-card label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}
.guide-gate-card input {
  width: 100%;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
}
.guide-gate-card button {
  appearance: none;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--primary-color);
  color: #060118;
}
.guide-gate-msg {
  margin: 12px 0 0;
  min-height: 1.2em;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}
.guide-gate-msg.is-err {
  color: #ff8d9a;
}
