
:root {
  --zena-green: #a7ff2f;
  --zena-green-2: #7fd618;
  --zena-bg: #080b0d;
  --zena-panel: #101418;
  --zena-panel-2: #161c21;
  --zena-text: #f6f7f3;
  --zena-muted: #aab2aa;
  --zena-border: rgba(167, 255, 47, 0.24);
  --zena-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.zena-helper-root, .zena-helper-root * {
  box-sizing: border-box;
}

.zena-helper-root {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 2147483000;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--zena-text);
}

.zena-helper-launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(167, 255, 47, 0.45);
  background: linear-gradient(145deg, rgba(13, 18, 21, 0.98), rgba(8, 11, 13, 0.98));
  color: var(--zena-text);
  border-radius: 999px;
  padding: 9px 14px 9px 9px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(167, 255, 47, 0.05) inset;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  max-width: min(86vw, 260px);
}

.zena-helper-launcher:hover,
.zena-helper-launcher:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(167, 255, 47, 0.8);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.48), 0 0 22px rgba(167, 255, 47, 0.16);
  outline: none;
}

.zena-helper-launcher-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(167, 255, 47, 0.75);
  background: #111;
  flex: 0 0 auto;
}

.zena-helper-launcher-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  display: block;
}

.zena-helper-launcher-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  min-width: 0;
}

.zena-helper-launcher-title {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.zena-helper-launcher-subtitle {
  color: var(--zena-muted);
  font-size: 12px;
  margin-top: 2px;
  white-space: nowrap;
}

.zena-helper-panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: min(390px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 110px));
  border: 1px solid var(--zena-border);
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(18, 24, 27, 0.98), rgba(7, 10, 12, 0.98));
  box-shadow: var(--zena-shadow), 0 0 0 1px rgba(255,255,255,0.04) inset;
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

.zena-helper-root.zena-open .zena-helper-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.zena-helper-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at top left, rgba(167,255,47,0.16), transparent 45%), rgba(9, 12, 14, 0.92);
}

.zena-helper-header-avatar {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(167,255,47,0.5);
  background: #111;
  flex: 0 0 auto;
}

.zena-helper-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 16%;
  display: block;
}

.zena-helper-title-wrap {
  min-width: 0;
  flex: 1 1 auto;
}

.zena-helper-kicker {
  color: var(--zena-green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zena-helper-title {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 900;
}

.zena-helper-subtitle {
  color: var(--zena-muted);
  font-size: 12px;
  margin-top: 3px;
}

.zena-helper-close {
  appearance: none;
  border: 0;
  background: rgba(255,255,255,0.08);
  color: var(--zena-text);
  border-radius: 12px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.zena-helper-close:hover,
.zena-helper-close:focus-visible {
  background: rgba(167,255,47,0.16);
  outline: 2px solid rgba(167,255,47,0.4);
  outline-offset: 2px;
}

.zena-helper-messages {
  padding: 16px;
  overflow-y: auto;
  max-height: min(390px, calc(100vh - 330px));
  scroll-behavior: smooth;
}

.zena-helper-message {
  display: flex;
  gap: 10px;
  margin-bottom: 13px;
}

.zena-helper-message.zena-user {
  justify-content: flex-end;
}

.zena-helper-bubble {
  border-radius: 18px;
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.45;
  max-width: 86%;
}

.zena-helper-message.zena-bot .zena-helper-bubble {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--zena-text);
  border-top-left-radius: 8px;
}

.zena-helper-message.zena-user .zena-helper-bubble {
  background: linear-gradient(135deg, rgba(167,255,47,0.95), rgba(126,214,24,0.95));
  color: #071005;
  border-top-right-radius: 8px;
  font-weight: 650;
}

.zena-helper-message-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.zena-helper-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(167,255,47,0.12);
  border: 1px solid rgba(167,255,47,0.32);
  color: var(--zena-green);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.zena-helper-link:hover,
.zena-helper-link:focus-visible {
  background: rgba(167,255,47,0.2);
  outline: 2px solid rgba(167,255,47,0.35);
  outline-offset: 2px;
}

.zena-helper-suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 16px 14px;
}

.zena-helper-chip {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--zena-text);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.zena-helper-chip:hover,
.zena-helper-chip:focus-visible {
  border-color: rgba(167,255,47,0.55);
  background: rgba(167,255,47,0.12);
  outline: none;
}

.zena-helper-form {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(4, 6, 7, 0.72);
}

.zena-helper-input {
  min-width: 0;
  flex: 1 1 auto;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  color: var(--zena-text);
  padding: 12px 12px;
  font-size: 14px;
}

.zena-helper-input::placeholder {
  color: rgba(246,247,243,0.55);
}

.zena-helper-input:focus {
  outline: 2px solid rgba(167,255,47,0.42);
  border-color: rgba(167,255,47,0.5);
}

.zena-helper-submit {
  appearance: none;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--zena-green), var(--zena-green-2));
  color: #061004;
  font-weight: 900;
  padding: 0 14px;
  cursor: pointer;
}

.zena-helper-submit:hover,
.zena-helper-submit:focus-visible {
  filter: brightness(1.05);
  outline: 2px solid rgba(167,255,47,0.42);
  outline-offset: 2px;
}

.zena-helper-disclaimer {
  color: rgba(246,247,243,0.52);
  font-size: 11px;
  line-height: 1.35;
  padding: 0 16px 14px;
}

@media (max-width: 520px) {
  .zena-helper-root {
    right: 12px;
    bottom: 12px;
  }

  .zena-helper-panel {
    right: -4px;
    bottom: 64px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 96px);
    border-radius: 20px;
  }

  .zena-helper-launcher-copy {
    display: none;
  }

  .zena-helper-launcher {
    padding: 8px;
  }

  .zena-helper-messages {
    max-height: calc(100vh - 330px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .zena-helper-panel,
  .zena-helper-launcher {
    transition: none;
  }

  .zena-helper-messages {
    scroll-behavior: auto;
  }
}


/* Zena answer readability polish */
.zena-helper-bubble {
  line-height: 1.45;
  letter-spacing: -0.01em;
}
.zena-helper-message-links {
  gap: 8px;
}
.zena-helper-link {
  white-space: normal;
  line-height: 1.15;
}
