/* Nami, the AccuraTrials guide (nami.js builds the markup). A launcher in the
   bottom-right corner, a one-time hello beside it, and a chat panel that
   opens from the launcher. Motion is short and stops for reduced motion and
   the site's pause control. */
.nami-launch {
  position: fixed;
  right: 20px;
  bottom: 18px;
  z-index: 80;
  width: 68px;
  height: 68px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #10223d, #060b14 72%);
  box-shadow: 0 0 0 1px rgba(92, 200, 255, 0.28), 0 14px 34px -8px rgba(26, 125, 255, 0.55), 0 0 40px -10px rgba(92, 200, 255, 0.5);
  cursor: pointer;
  transition: transform 180ms var(--ease-out), box-shadow 180ms ease;
  -webkit-tap-highlight-color: transparent;
}
.nami-launch__face { display: block; width: 100%; height: 100%; animation: namiBob 4.4s ease-in-out infinite; }
.nami-launch__face svg, .nami-launch__face img { display: block; width: 100%; height: 100%; }
.nami-launch .nami-eye { transform-box: fill-box; transform-origin: 50% 60%; animation: namiBlink 5.8s infinite; }
.nami-launch .nami-tail { transform-box: view-box; transform-origin: 188px 150px; animation: namiTail 3.6s ease-in-out infinite; }
@keyframes namiBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes namiBlink { 0%, 93%, 100% { transform: scaleY(1); } 95.5% { transform: scaleY(0.08); } }
@keyframes namiTail { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-5deg); } }
@media (hover: hover) and (pointer: fine) {
  .nami-launch:hover { transform: scale(1.06); box-shadow: 0 0 0 1px rgba(92, 200, 255, 0.5), 0 16px 40px -8px rgba(26, 125, 255, 0.7), 0 0 50px -8px rgba(92, 200, 255, 0.65); }
}
.nami-launch:active { transform: scale(0.96); }
.nami-launch:focus-visible { outline: 2px solid #9fd8ff; outline-offset: 3px; }
.nami-launch[aria-expanded="true"] .nami-launch__face { animation: none; }

/* The site's pause button sits beside her, not under her. */
html.has-nami .motion-toggle { right: 100px; bottom: 30px; }

.nami-tip {
  position: fixed;
  right: 22px;
  bottom: 100px;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  max-width: min(290px, calc(100vw - 44px));
  border: 1px solid rgba(92, 200, 255, 0.35);
  border-radius: 14px 14px 4px 14px;
  background: rgba(8, 14, 24, 0.96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px -12px rgba(0, 0, 0, 0.8), 0 0 30px -12px rgba(92, 200, 255, 0.45);
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transform-origin: 100% 100%;
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}
.nami-tip.is-shown { opacity: 1; transform: none; }
.nami-tip__text { flex: 1; padding: 12px 4px 12px 14px; border: 0; background: none; color: var(--fg); font: 500 13.5px/1.45 var(--font-ui); text-align: left; cursor: pointer; }
.nami-tip__x { flex: none; width: 30px; height: 30px; margin: 4px 4px 0 0; border: 0; border-radius: 8px; background: none; color: var(--label); font-size: 18px; line-height: 1; cursor: pointer; }
.nami-tip__x:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

.nami-panel {
  position: fixed;
  right: 20px;
  bottom: 100px;
  z-index: 81;
  display: flex;
  flex-direction: column;
  width: min(392px, calc(100vw - 40px));
  height: min(620px, calc(100vh - 128px));
  height: min(620px, calc(100dvh - 128px));
  border: 1px solid rgba(120, 170, 220, 0.22);
  border-radius: 20px;
  background: radial-gradient(ellipse 90% 40% at 50% 0%, rgba(30, 120, 220, 0.16), transparent 70%), rgba(6, 10, 17, 0.97);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--fg);
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transform-origin: 100% 100%;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.nami-panel.is-open { opacity: 1; transform: none; }
.nami-panel[hidden] { display: none; }
.nami-panel:focus { outline: none; }

.nami-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.nami-head__face { flex: none; width: 42px; height: 42px; }
.nami-head__text { flex: 1; min-width: 0; }
.nami-head__title { margin: 0; font: 500 19px/1.1 var(--font-display); letter-spacing: -0.01em; color: #fff; }
.nami-head__title span { margin-left: 4px; font-size: 15px; color: #9fd8ff; }
.nami-head__text p { margin: 4px 0 0; font: 500 9.5px var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
.nami-close { flex: none; width: 34px; height: 34px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; transition: background-color 150ms ease, color 150ms ease; }
.nami-close:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nami-close:focus-visible, .nami-chip:focus-visible, .nami-send:focus-visible, .nami-inline:focus-visible, .nami-form__send:focus-visible { outline: 2px solid #9fd8ff; outline-offset: 2px; }

.nami-log { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 16px 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.15) transparent; }
.nami-msg { max-width: 88%; padding: 11px 13px; border-radius: 14px; font-size: 14px; line-height: 1.55; animation: namiIn 220ms var(--ease-out) both; }
.nami-msg p { margin: 0; }
.nami-msg--nami { align-self: flex-start; border: 1px solid rgba(255, 255, 255, 0.08); border-top-left-radius: 4px; background: rgba(255, 255, 255, 0.045); color: rgba(236, 239, 244, 0.92); }
.nami-msg--you { align-self: flex-end; border: 1px solid rgba(92, 200, 255, 0.35); border-top-right-radius: 4px; background: rgba(92, 200, 255, 0.12); color: #fff; }
.nami-msg--typing { display: flex; gap: 5px; padding: 14px 15px; }
.nami-msg--typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(159, 216, 255, 0.85); animation: namiDot 1s ease-in-out infinite; }
.nami-msg--typing i:nth-child(2) { animation-delay: 0.15s; }
.nami-msg--typing i:nth-child(3) { animation-delay: 0.3s; }
.nami-msg--form { max-width: 100%; width: 100%; }
@keyframes namiIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes namiDot { 0%, 100% { opacity: 0.35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.nami-link { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; color: #9fd8ff; border-bottom: 1px solid rgba(159, 216, 255, 0.35); }
.nami-link:hover { color: #fff; border-bottom-color: #fff; }
.nami-inline { display: inline-flex; align-items: center; height: 32px; margin-top: 10px; padding: 0 14px; border: 1px solid rgba(92, 200, 255, 0.45); border-radius: 999px; background: rgba(92, 200, 255, 0.1); color: #fff; font: 600 12.5px var(--font-ui); cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease; }
.nami-inline:hover { background: rgba(92, 200, 255, 0.2); border-color: rgba(92, 200, 255, 0.7); }

.nami-chips { display: flex; gap: 8px; padding: 10px 14px; overflow-x: auto; border-top: 1px solid rgba(255, 255, 255, 0.06); scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.nami-chips::-webkit-scrollbar { display: none; }
.nami-chip { flex: none; height: 32px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.03); color: rgba(236, 239, 244, 0.88); font: 500 12.5px var(--font-ui); white-space: nowrap; cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease; }
.nami-chip:hover { border-color: rgba(92, 200, 255, 0.55); background: rgba(92, 200, 255, 0.08); color: #fff; }
.nami-chip:active, .nami-inline:active, .nami-send:active, .nami-form__send:active { transform: scale(0.97); }
.nami-chip--team { border-color: rgba(92, 200, 255, 0.45); color: #9fd8ff; }

.nami-ask { display: flex; gap: 8px; padding: 4px 14px 10px; }
.nami-ask input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.04); color: #fff; font: 400 16px var(--font-ui); transition: border-color 150ms ease, background-color 150ms ease; }
.nami-ask input::placeholder { color: rgba(236, 239, 244, 0.45); }
.nami-ask input:focus { outline: none; border-color: rgba(92, 200, 255, 0.6); background: rgba(92, 200, 255, 0.06); }
.nami-send { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 12px; background: #fff; color: #05080d; cursor: pointer; transition: transform 120ms var(--ease-out); }
.nami-send svg { width: 18px; height: 18px; }
.nami-note { margin: 0; padding: 0 16px 12px; font-size: 11px; line-height: 1.5; color: var(--faint); }

.nami-form { display: grid; gap: 10px; }
.nami-field { display: grid; gap: 4px; }
.nami-field label { font: 500 9.5px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.nami-field input, .nami-field textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(5, 8, 13, 0.7); color: #fff; font: 400 16px/1.4 var(--font-ui); resize: vertical; transition: border-color 150ms ease; }
.nami-field input:focus, .nami-field textarea:focus { outline: none; border-color: rgba(92, 200, 255, 0.6); }
.nami-field input:user-invalid { border-color: rgba(255, 69, 58, 0.6); }
.nami-field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nami-form__send { height: 40px; margin-top: 2px; border: 0; border-radius: 999px; background: #fff; color: #000; font: 600 12.5px var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; transition: transform 120ms var(--ease-out), opacity 150ms ease; }
.nami-form__send:disabled { opacity: 0.6; cursor: progress; }
.nami-form__fine { margin: 0; font-size: 11.5px; color: var(--faint); }
.nami-form__error { margin: 0; font-size: 13px; color: #ff8a82; }
.nami-form__error a { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.4); }

@media (max-width: 560px) {
  .nami-launch { right: 14px; bottom: 14px; width: 58px; height: 58px; }
  html.has-nami .motion-toggle { right: 82px; bottom: 24px; }
  .nami-tip { right: 14px; bottom: 84px; }
  .nami-panel { left: 8px; right: 8px; bottom: 8px; width: auto; height: min(640px, calc(100vh - 16px)); height: min(640px, calc(100dvh - 16px)); }
  html.nami-is-open .nami-launch { opacity: 0; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nami-launch__face, .nami-launch .nami-eye, .nami-launch .nami-tail, .nami-msg, .nami-msg--typing i { animation: none; }
  .nami-panel, .nami-tip { transition: opacity 150ms ease; transform: none; }
}
