.ask-float {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 1100;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(0, 224, 198, 0.72);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.45),
    0 0 22px rgba(0, 224, 198, 0.28);
  background: #05070c;
  text-decoration: none;
}

.ask-float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}

.ask-float span {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #00e0c6;
  color: #04221e;
  font: 800 10px/1 var(--vela-font);
  letter-spacing: 0.02em;
  padding: 4px 7px;
  white-space: nowrap;
}

.ask-float:hover {
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: no-preference) {
  .ask-float {
    animation: ask-float-in 0.45s ease both;
  }
}

@keyframes ask-float-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.ask-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: var(--vela-t1);
  font-family: var(--vela-font);
  background:
    radial-gradient(ellipse 80% 40% at 10% -10%, rgba(0, 224, 198, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 30% at 100% 0%, rgba(240, 193, 74, 0.08), transparent 50%),
    var(--vela-bg-0);
}

.ask-page > .ox-chain-credit {
  flex: 0 0 auto;
  margin-top: 0;
}

.ask-top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  width: min(880px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 8px;
}

.ask-bar,
.ask-tools,
.ask-ident {
  display: flex;
  align-items: center;
}

.ask-bar {
  justify-content: space-between;
  gap: 12px 16px;
  min-height: 48px;
}

.ask-tools {
  gap: 12px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}

.ask-ident {
  gap: 14px;
  min-width: 0;
}

.ask-brand {
  display: flex;
  flex: 0 0 auto;
}

.ask-botface {
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
}

.ask-botface__orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px dashed rgba(0, 224, 198, 0.75);
  border-top-color: #f0c14a;
}

.ask-botface img,
.ask-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
  border-radius: 50%;
}

.ask-botface img {
  position: absolute;
  z-index: 1;
  inset: 7px;
  width: auto;
  height: auto;
  border: 2px solid rgba(0, 224, 198, 0.8);
  box-shadow: 0 0 18px rgba(0, 224, 198, 0.35);
}

.ask-botface b {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 2;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00e0c6;
  border: 2px solid #05070c;
  box-shadow: 0 0 8px #00e0c6;
}

.ask-botface.is-thinking b {
  background: #f0c14a;
  box-shadow: 0 0 8px #f0c14a;
}

.ask-kicker {
  margin: 0;
  color: #f0c14a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.ask-top__copy {
  min-width: 0;
}

.ask-top__copy h1 {
  margin: 0;
  color: var(--vela-t0);
  font-size: 22px;
  line-height: 1.1;
}

.ask-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.ask-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  color: var(--vela-acc);
  font-size: 12px;
  font-weight: 700;
}

.ask-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00e0c6;
  box-shadow: 0 0 8px #00e0c6;
}

.ask-status.is-thinking {
  color: var(--vela-gold, #f0c14a);
}

.ask-status.is-thinking span {
  background: #f0c14a;
  box-shadow: 0 0 8px #f0c14a;
}

.ask-lang {
  display: flex;
  flex: 0 0 auto;
  margin-inline-start: auto;
}

.ask-lang select {
  min-width: 132px;
  border: 1px solid rgba(0, 224, 198, 0.4);
  border-radius: 999px;
  background: rgba(5, 10, 16, 0.9);
  color: var(--vela-t0);
  font: 600 13px/1 var(--vela-font);
  padding: 8px 12px;
}

.ask-home,
.ask-nav,
.ask-join,
.how-home,
.how-ask {
  text-decoration: none;
  white-space: nowrap;
}

.ask-home,
.ask-nav,
.how-home,
.how-ask {
  color: var(--vela-acc);
  font-weight: 700;
}

.ask-join {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--vela-acc);
  color: #04221e;
  font-weight: 800;
  padding: 12px 18px;
}

.ask-wrap {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: min(880px, calc(100% - 32px));
  min-height: 0;
  margin: 0 auto;
  padding-bottom: 12px;
}

.ask-panel {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  margin-top: 12px;
  border: 1px solid rgba(0, 224, 198, 0.42);
  border-radius: 28px;
  background:
    linear-gradient(rgba(0, 224, 198, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 224, 198, 0.05) 1px, transparent 1px),
    radial-gradient(ellipse 70% 40% at 0% 0%, rgba(0, 224, 198, 0.1), transparent 50%),
    rgba(4, 9, 16, 0.96);
  background-size: 28px 28px, 28px 28px, auto, auto;
  box-shadow:
    0 0 0 1px rgba(240, 193, 74, 0.12),
    0 0 40px rgba(0, 224, 198, 0.08),
    0 24px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.ask-panel__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 224, 198, 0.22);
  background: rgba(0, 224, 198, 0.05);
}

.ask-panel__bar > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 224, 198, 0.35);
}

.ask-panel__bar > span:first-child {
  background: #f0c14a;
}

.ask-panel__bar b {
  margin-left: 8px;
  color: #7ef3e6;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.ask-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 22px 18px 8px;
}

.ask-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: min(100%, 680px);
}

.ask-row--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ask-avatar,
.ask-you {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
}

.ask-avatar i {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 224, 198, 0.55);
  border-right-color: transparent;
}

.ask-avatar img {
  border: 1.5px solid rgba(0, 224, 198, 0.85);
  box-shadow: 0 0 16px rgba(0, 224, 198, 0.35);
}

.ask-you {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(240, 193, 74, 0.12);
  border: 1.5px solid rgba(240, 193, 74, 0.55);
  color: #f0c14a;
}

.ask-you svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.ask-msg {
  min-width: 0;
  border-radius: 18px;
  padding: 12px 14px;
}

.ask-msg--bot {
  border-end-start-radius: 6px;
  background: rgba(10, 22, 30, 0.92);
  border: 1px solid rgba(0, 224, 198, 0.22);
}

.ask-msg--user {
  border-end-end-radius: 6px;
  background: linear-gradient(180deg, rgba(0, 224, 198, 0.22), rgba(0, 224, 198, 0.1));
  border: 1px solid rgba(0, 224, 198, 0.4);
}

.ask-msg__who {
  margin: 0 0 4px;
  color: #7ef3e6;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ask-msg--user .ask-msg__who {
  color: #f0c14a;
}

.ask-msg__text {
  margin: 0;
  color: var(--vela-t0);
  white-space: pre-wrap;
  line-height: 1.55;
}

.ask-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  margin: 0;
}

.ask-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00e0c6;
  animation: ask-dot 1s ease-in-out infinite;
}

.ask-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.ask-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes ask-dot {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.ask-suggest {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 14px 0;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}

.ask-page[dir="rtl"] .ask-suggest {
  mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent);
}

.ask-suggest::-webkit-scrollbar {
  display: none;
}

.ask-suggest button {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(0, 224, 198, 0.35);
  background: rgba(0, 224, 198, 0.08);
  color: #bffcf4;
  cursor: pointer;
  font: 600 13px/1.2 var(--vela-font);
  padding: 8px 12px;
}

.ask-suggest button:hover {
  background: rgba(0, 224, 198, 0.18);
}

.ask-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px;
  padding: 6px 6px 6px 16px;
  border: 1px solid rgba(0, 224, 198, 0.35);
  border-radius: 999px;
  background: rgba(5, 8, 14, 0.88);
  box-shadow: 0 0 24px rgba(0, 224, 198, 0.08);
}

.ask-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--vela-t0);
  font: 500 16px/1.3 var(--vela-font);
  padding: 10px 0;
}

.ask-form input:focus {
  outline: none;
}

.ask-form button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: #00e0c6;
  color: #04221e;
  cursor: pointer;
}

.ask-form button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ask-form button:disabled {
  cursor: default;
  opacity: 0.4;
}

@media (prefers-reduced-motion: no-preference) {
  .ask-status span,
  .ask-botface b {
    animation: ask-live 1.8s ease-out infinite;
  }

  .ask-botface__orbit,
  .ask-avatar i {
    animation: ask-spin 8s linear infinite;
  }

  .ask-botface.is-thinking .ask-botface__orbit,
  .ask-avatar.is-thinking i {
    animation-duration: 1.6s;
  }
}

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

@keyframes ask-live {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 224, 198, 0.55);
  }
  100% {
    box-shadow: 0 0 0 8px rgba(0, 224, 198, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ask-typing span,
  .ask-status span,
  .ask-botface b,
  .ask-botface__orbit,
  .ask-avatar i {
    animation: none;
  }
}

@media (max-width: 720px) {
  .ask-bar {
    align-items: center;
  }

  .ask-tools {
    gap: 8px 10px;
  }

  .ask-join {
    padding: 8px 12px;
  }

  .ask-botface {
    width: 64px;
    height: 64px;
  }

  .ask-lang select {
    width: auto;
    min-width: 118px;
    padding: 8px 12px;
  }

  .ask-thread {
    padding: 16px;
  }

  .ask-avatar,
  .ask-you {
    width: 36px;
    height: 36px;
  }
}
