/* In-app guide. The ghost is the button. The sheet is the conversation.
   It floats (guide-ui.js moves it). Press-and-hold parks it in this corner, where it sits still. */
.nc-ghost {
  position: fixed;
  left: 12vw;
  top: 18vh;
  right: auto;
  bottom: auto;
  z-index: 96;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.nc-ghost.is-docked {
  left: auto;
  top: auto;
  right: max(.75rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
}
html.nc-customer-app .nc-ghost.is-docked { bottom: calc(64px + env(safe-area-inset-bottom)); }
html.nc-native .nc-ghost { width: 56px; height: 56px; }
html.nc-native .nc-ghost svg { width: 40px; height: 48px; }
html.nc-native .nc-ghost.is-docked { bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
.nc-ghost svg {
  display: block;
  width: 28px;
  height: 33px;
  margin: 5px auto 0;
  overflow: hidden;
  animation: nc-ghost-bob 2.6s ease-in-out infinite;
}
.nc-ghost.is-docked svg { animation: none; }
.nc-ghost.is-holding svg { animation-play-state: paused; filter: drop-shadow(0 0 4px rgba(211, 158, 23, .9)); }
.nc-ghost-shape { fill: #4CBB17; opacity: .58; } /* Kelly green, still see-through */
.nc-ghost-trim { fill: none; stroke: #D39E17; stroke-width: 1.6px; stroke-linejoin: round; opacity: .92; }
.nc-ghost-eye { fill: #fff; opacity: .95; }
.nc-ghost-pupil { fill: #1a1a1a; }
.nc-ghost-glimmer { animation: nc-ghost-glimmer 2.6s ease-in-out infinite; }
.nc-ghost.is-answering .nc-ghost-glimmer { animation-duration: .85s; }
.nc-ghost:focus-visible { outline: 3px solid var(--brand-gold); outline-offset: 3px; border-radius: 18px; }
@keyframes nc-ghost-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes nc-ghost-glimmer {
  0%, 8% { transform: translateX(-8px); }
  92%, 100% { transform: translateX(36px); }
}
@media (prefers-reduced-motion: reduce) {
  .nc-ghost,
  .nc-ghost svg,
  .nc-ghost-glimmer { animation: none; }
  .nc-ghost-glimmer { transform: translateX(8px); }
}
.customer-tab-assistant {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: .45rem .2rem;
  border: 0;
  background: none;
  color: #F7F1E4;
  font: 700 .72rem/1.15 var(--font-body);
  cursor: pointer;
}
.nc-guide {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  align-items: end;
  justify-items: stretch;
  padding: max(.75rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right)) calc(6.5rem + env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left));
}
html.nc-customer-app .nc-guide { padding-bottom: calc(6.5rem + 64px + env(safe-area-inset-bottom)); }
html.nc-customer-app .ninescan-status { bottom: calc(4.75rem + env(safe-area-inset-bottom)); }
.nc-guide[hidden] { display: none !important; }
.nc-guide-backdrop { position: absolute; inset: 0; background: rgba(12, 11, 10, .45); }
.nc-guide-panel {
  position: relative;
  width: min(420px, 100%);
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1rem;
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}
.nc-guide-head { display: flex; align-items: center; gap: .6rem; }
.nc-guide-head h2 { margin: 0; font-size: 1.15rem; }
.nc-guide-name { flex: 1; min-width: 0; }
.nc-guide-log { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: .45rem; min-height: 8rem; }
.nc-guide-bubble { margin: 0; padding: .55rem .7rem; border-radius: 12px; max-width: 100%; }
.nc-guide-bubble.user { align-self: flex-end; background: var(--green-50); color: var(--green-700); }
.nc-guide-bubble.bot { align-self: flex-start; background: var(--n-100); }
.nc-guide-quick { display: flex; flex-wrap: wrap; gap: .4rem; }
.nc-guide-form { display: flex; flex-wrap: wrap; gap: .4rem; }
.nc-guide-form input { flex: 1; min-width: 8rem; }
.nc-guide-confirm { display: flex; gap: .4rem; }
.nc-guide-note { margin: 0; }

/* Function tour. The card sits above the menu drawer (z 90) and the ghost (z 96), below modals (z 100). */
.nc-tour {
  position: fixed;
  right: max(.75rem, env(safe-area-inset-right));
  bottom: calc(1rem + 84px + env(safe-area-inset-bottom));
  z-index: 97;
  width: min(340px, calc(100% - 1.5rem));
  padding: .9rem 1rem .8rem;
  background: var(--color-surface);
  color: var(--color-text);
  border: 2px solid rgba(76, 187, 23, .58); /* Kelly green, same see-through as the ghost */
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl), 0 0 0 4px rgba(211, 158, 23, .18);
}
html.nc-customer-app .nc-tour { bottom: calc(64px + 84px + env(safe-area-inset-bottom)); }
.nc-tour.nc-tour-top { top: max(.75rem, env(safe-area-inset-top)); bottom: auto; }
.nc-tour[hidden] { display: none !important; }
.nc-tour-count { margin: 0 0 .2rem; }
.nc-tour-title { margin: 0 1.5rem .35rem 0; font-size: 1.05rem; }
.nc-tour-body { margin: 0 0 .7rem; }
.nc-tour-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.nc-tour-close { position: absolute; top: .35rem; right: .45rem; width: 32px; height: 32px; border: 0; background: none; color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.nc-tour-close:focus-visible { outline: 3px solid var(--brand-gold); border-radius: 8px; }

/* The spot the ghost is pointing at: Kelly green ring with a gold glimmer. */
.nc-tour-spot {
  border-radius: 12px;
  outline: 3px solid rgba(76, 187, 23, .58);
  outline-offset: 3px;
  animation: nc-tour-glimmer 1.6s ease-in-out infinite;
}
@keyframes nc-tour-glimmer {
  0%, 100% { box-shadow: 0 0 0 0 rgba(211, 158, 23, .0); }
  50% { box-shadow: 0 0 0 6px rgba(211, 158, 23, .45), 0 0 18px 4px rgba(255, 246, 208, .55); }
}

/* Wide screens hide 9scan in the inline menu. While the ghost points at it, show it like a menu link. */
@media (min-width: 72.0625em) {
  html.nc-show-9scan .main-nav > .nav-9scan:not([hidden]) {
    display: inline-flex;
    align-items: center;
    padding: .7rem .5rem;
    border: 0;
    background: none;
    color: var(--color-text);
    font: 700 .98rem/1 var(--font-body);
    white-space: nowrap;
    cursor: pointer;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nc-tour-spot { animation: none; box-shadow: 0 0 0 4px rgba(211, 158, 23, .45); }
}
