#ns-act-root {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ns-act-text, #12233d);
  background: var(--ns-act-bg, #f7f9fc);
  transition: opacity 0.2s, transform 0.2s;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

#ns-act-root.ns-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#ns-act-root * {
  box-sizing: border-box;
}

#ns-act-root [hidden] {
  display: none !important;
}

/* Shell (Panel + Main) */

.ns-act-shell {
  display: flex;
  width: 100%;
  height: 100%;
}

/* Panel (Agent + Chat) */

.ns-act-panel {
  width: var(--ns-act-panel-w, 340px);
  min-width: 280px;
  max-width: calc(100vw - 300px);
  height: 100%;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--ns-act-border, #dce4ee);
  padding: 12px;
}

.ns-act-agent {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
}

.ns-act-avatar-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 8px;
}

.ns-act-avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 0 0 2px var(--ns-act-accent, #d4a847);
  transition: box-shadow 0.3s;
}

.ns-act-avatar-wrap:hover .ns-act-avatar {
  box-shadow: 0 0 0 4px var(--ns-act-accent, #d4a847);
}

.ns-act-avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(to bottom right, var(--ns-act-primary, #0a1628), var(--ns-act-accent, #d4a847));
  color: #fff;
  font-size: 32px;
  font-weight: bold;
  text-transform: uppercase;
}

.ns-act-agent-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  text-align: center;
}

.ns-act-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #666;
}

.ns-act-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4caf50;
}

#ns-act-root[data-status='connecting'] .ns-act-status-dot {
  background-color: #ffc107;
}

#ns-act-root[data-status='listening'] .ns-act-status-dot {
  background-color: #2196f3;
}

#ns-act-root[data-status='speaking'] .ns-act-status-dot {
  background-color: #f44336;
}


/* Chat Area */

.ns-act-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ns-act-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  scroll-behavior: smooth;
}

.ns-act-msg {
  margin-bottom: 10px;
  max-width: 80%;
}

.ns-act-msg.is-user {
  margin-left: auto;
  text-align: right;
}

.ns-act-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  background-color: #fff;
  border: 1px solid var(--ns-act-border, #dce4ee);
  color: var(--ns-act-text, #12233d);
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.ns-act-msg.is-user .ns-act-bubble {
  background-color: var(--ns-act-primary, #0a1628);
  color: #fff;
  border-color: var(--ns-act-primary, #0a1628);
}

.ns-act-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 40px;
}

.ns-act-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #999;
  animation: nsTyping 1s infinite ease-in-out;
  display: inline-block;
}

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

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

@keyframes nsTyping {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.55;
  }

  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* Input Area */

.ns-act-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--ns-act-border, #dce4ee);
}

.ns-act-input {
  flex: 1;
  min-height: 40px;
  max-height: 140px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--ns-act-border, #dce4ee);
  font-size: 14px;
  line-height: 1.4;
  resize: none;
  overflow: hidden;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.ns-act-input:focus {
  border-color: var(--ns-act-accent, #d4a847);
  box-shadow: 0 0 0 2px rgba(var(--ns-act-accent-rgb, 212, 168, 71), 0.2);
}

.ns-act-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: transparent;
  color: var(--ns-act-primary, #0a1628);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
  outline: none;
}

.ns-act-btn:hover {
  background-color: rgba(var(--ns-act-primary-rgb, 10, 22, 40), 0.1);
}

.ns-act-btn svg {
  width: 20px;
  height: 20px;
}

.ns-act-send {
  background-color: var(--ns-act-primary, #0a1628);
  color: #fff;
}

.ns-act-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ns-act-powered {
  text-align: center;
  font-size: 11px;
  color: #777;
  padding: 6px;
}

.ns-act-powered a {
  color: inherit;
  text-decoration: none;
}

.ns-act-mic.is-live {
  color: var(--ns-act-accent, #d4a847);
  animation: nsPulse 1.5s infinite;
}

#ns-act-root[data-status='connecting'] .ns-act-mic,
#ns-act-root[data-status='listening'] .ns-act-mic,
#ns-act-root[data-status='speaking'] .ns-act-mic {
  color: var(--ns-act-accent, #d4a847);
  animation: nsPulse 1.5s infinite;
}

@keyframes nsPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--ns-act-accent-rgb, 212, 168, 71), 0.4);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(var(--ns-act-accent-rgb, 212, 168, 71), 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(var(--ns-act-accent-rgb, 212, 168, 71), 0);
  }
}


/* Main (Iframe + Nav) */

.ns-act-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.ns-act-frame-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.ns-act-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.ns-act-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-top: 1px solid var(--ns-act-border, #dce4ee);
  background-color: #fff;
  gap: 6px;
  min-height: 48px;
}

.ns-act-nav-util {
  display: flex;
  gap: 4px;
}

.ns-act-nav-util-btn {
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background-color: transparent;
  color: var(--ns-act-primary, #0a1628);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background-color 0.2s;
  outline: none;
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
}

.ns-act-nav-util-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Exit ACT button — subtle distinct styling */
.ns-act-exit-btn {
  margin-left: auto;
  color: #b94a48;
  font-weight: 600;
}
.ns-act-exit-btn:hover {
  background-color: rgba(185, 74, 72, 0.12);
  color: #a03432;
}
.ns-act-exit-btn svg {
  width: 14px;
  height: 14px;
}

.ns-act-nav-util-btn:hover {
  background-color: rgba(var(--ns-act-primary-rgb, 10, 22, 40), 0.1);
}

.ns-act-nav-util-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.ns-act-nav-items {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scroll-behavior: smooth;
}

.ns-act-nav-btn {
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background-color: transparent;
  color: var(--ns-act-primary, #0a1628);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background-color 0.2s;
  outline: none;
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
}

.ns-act-nav-btn:hover {
  background-color: rgba(var(--ns-act-primary-rgb, 10, 22, 40), 0.1);
}

.ns-act-nav-btn svg {
  width: 14px;
  height: 14px;
  display: block;
  opacity: 0.6;
}

.ns-act-nav-btn.has-children {
  position: relative;
  padding-right: 24px;
}

.ns-act-nav-btn.has-children svg {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
}

.ns-act-menu-btn {
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background-color: transparent;
  color: var(--ns-act-primary, #0a1628);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background-color 0.2s;
  outline: none;
}

.ns-act-menu-btn:hover {
  background-color: rgba(var(--ns-act-primary-rgb, 10, 22, 40), 0.1);
}

.ns-act-menu-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* Splitter */

.ns-act-splitter {
  position: relative;
  width: 8px;
  cursor: col-resize;
  background-color: #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ns-act-splitter span {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: #999;
  margin: 2px 0;
}

/* Close Button */

.ns-act-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--ns-act-primary, #0a1628);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  outline: none;
  z-index: 2;
  border: none;
}

.ns-act-close:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.ns-act-close svg {
  width: 16px;
  height: 16px;
}

/* Full Sitemap */

.ns-act-menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 22, 40, 0.97);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  z-index: 3;
  color: #e4edf8;
}

.ns-act-menu-head {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(212, 168, 71, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ns-act-menu-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.ns-act-menu-close {
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background-color: transparent;
  color: #e4edf8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background-color 0.2s;
  outline: none;
}

.ns-act-menu-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.ns-act-menu-close svg {
  width: 20px;
  height: 20px;
  display: block;
}

.ns-act-menu-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.ns-act-menu-link {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: none;
  background-color: transparent;
  color: #d0dff5;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
  border: 1px solid transparent;
}

.ns-act-menu-link:hover {
  background-color: rgba(212, 168, 71, 0.12);
  border-color: rgba(212, 168, 71, 0.3);
  color: #fff;
}

.ns-act-menu-empty {
  padding: 10px 14px;
  font-size: 14px;
  color: #7a8da6;
  text-align: center;
}

/* Mobile Styles */

@media (max-width: 767px) {
  .ns-act-shell {
    flex-direction: column;
  }

  .ns-act-panel {
    width: 100%;
    max-width: none;
    height: 40vh;
    border-right: none;
    border-bottom: 1px solid var(--ns-act-border, #dce4ee);
    padding: 8px;
  }

  .ns-act-agent-name {
    font-size: 16px;
  }

  .ns-act-avatar-wrap {
    width: 80px;
    height: 80px;
  }

  .ns-act-avatar-fallback {
    font-size: 24px;
  }

  .ns-act-chat {
    padding: 4px;
  }

  .ns-act-messages {
    padding: 8px;
  }

  .ns-act-input-wrap {
    padding: 8px;
  }

  .ns-act-splitter {
    display: none;
  }

  .ns-act-nav {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 4px;
    overflow-x: auto;
    min-height: auto;
  }

  .ns-act-nav-util {
    order: 1;
  }

  .ns-act-nav-items {
    order: 2;
    flex: 1;
    overflow-x: auto;
  }

  .ns-act-menu-btn {
    order: 3;
  }

  .ns-act-close {
    top: auto;
    bottom: 4px;
    right: 4px;
  }
}

/* Dark Mode */

@media (prefers-color-scheme: dark) {
  #ns-act-root {
    background: #121212;
    color: #eee;
  }

  .ns-act-bubble {
    background-color: #333;
    border-color: #555;
    color: #eee;
  }

  .ns-act-msg.is-user .ns-act-bubble {
    background-color: var(--ns-act-accent, #d4a847);
    border-color: var(--ns-act-accent, #d4a847);
    color: #222;
  }

  .ns-act-input {
    background-color: #222;
    border-color: #555;
    color: #eee;
  }

  .ns-act-input::placeholder {
    color: #999;
  }

  .ns-act-nav {
    background-color: #222;
    border-color: #555;
  }

  .ns-act-nav-util-btn,
  .ns-act-nav-items,
  .ns-act-menu-btn {
    color: #eee;
  }

  .ns-act-splitter {
    background-color: #555;
  }

  .ns-act-splitter span {
    background-color: #eee;
  }

  .ns-act-menu {
    background-color: rgba(34, 34, 34, 0.95);
  }

  .ns-act-menu-link {
    color: #eee;
  }

  .ns-act-menu-link:hover {
    background-color: rgba(255, 255, 255, 0.07);
    border-color: #555;
  }
}


:root {
  --ns-act-primary-rgb: 10, 22, 40;
  --ns-act-accent-rgb: 212, 168, 71;
}






/* ------------------------------------------------------------------
   Delta 4 — Chrome-style ACT polish + bottom-right layout menu
------------------------------------------------------------------- */
#ns-act-root {
  --ns-act-surface: #f4f7fb;
  --ns-act-surface-2: #ffffff;
  --ns-act-border: rgba(87, 110, 148, 0.3);
  --ns-act-border-soft: rgba(87, 110, 148, 0.2);
  --ns-act-shadow: 0 12px 28px rgba(14, 22, 36, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.82);

  background:
    radial-gradient(1200px 520px at 50% -180px, rgba(255, 255, 255, 0.65), rgba(242, 246, 252, 0.88)),
    rgba(229, 236, 247, 0.74);
  backdrop-filter: blur(7px);
}

.ns-act-shell {
  padding: 14px;
  gap: 10px;
  align-items: stretch;
}

.ns-act-panel,
.ns-act-main {
  background: var(--ns-act-surface-2);
  border: 1px solid var(--ns-act-border-soft);
  border-radius: 12px;
  box-shadow: var(--ns-act-shadow);
}

.ns-act-panel {
  border-right: 1px solid var(--ns-act-border-soft);
  padding: 10px;
  overflow: hidden;
}

.ns-act-main {
  overflow: hidden;
}

.ns-act-agent {
  margin-bottom: 10px;
}

.ns-act-chat {
  border-radius: 12px;
  border: 1px solid var(--ns-act-border-soft);
  background: linear-gradient(180deg, #f8fbff 0%, #f4f7fc 100%);
  overflow: hidden;
}

.ns-act-messages {
  padding: 12px 12px 10px;
}

.ns-act-input-wrap {
  background: rgba(255, 255, 255, 0.86);
}

.ns-act-input {
  border-radius: 10px;
}

.ns-act-powered {
  border-top: 1px solid var(--ns-act-border-soft);
  padding: 7px 6px;
  background: rgba(255, 255, 255, 0.65);
}

.ns-act-frame-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  padding: 10px 10px 0;
}

.ns-act-frame-wrap::after {
  content: '';
  position: absolute;
  inset: 10px 10px 0;
  border-radius: 12px;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  z-index: 1;
}

.ns-act-iframe {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.ns-act-nav {
  position: relative;
  z-index: 2;
  margin: 8px 10px 10px;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--ns-act-border-soft);
  border-radius: 10px;
  background: rgba(248, 251, 255, 0.6);
  backdrop-filter: blur(5px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.ns-act-nav-util,
.ns-act-nav-items {
  min-width: 0;
}

.ns-act-nav-util-btn,
.ns-act-nav-btn,
.ns-act-menu-btn {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 550;
}

.ns-act-nav-util-btn span {
  letter-spacing: 0.01em;
}

.ns-act-menu-btn svg {
  width: 18px;
  height: 18px;
}

.ns-act-splitter {
  width: 10px;
  border-radius: 999px;
  background: transparent;
}

.ns-act-splitter::before {
  content: '';
  position: absolute;
  width: 2px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(100, 119, 150, 0.2), rgba(100, 119, 150, 0.55), rgba(100, 119, 150, 0.2));
}

.ns-act-splitter span {
  position: relative;
  z-index: 1;
  background-color: rgba(97, 118, 151, 0.9);
}

.ns-act-splitter[hidden] {
  display: none !important;
}

.ns-act-close {
  top: 18px;
  right: 18px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(85, 104, 134, 0.24);
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(12, 20, 33, 0.14);
}

.ns-act-close:hover {
  background-color: rgba(246, 250, 255, 0.98);
}

.ns-act-menu {
  border-radius: 14px;
  border: 1px solid rgba(212, 168, 71, 0.2);
  background-color: rgba(10, 22, 40, 0.97);
}

/* Panel state controls */
.ns-act-shell.is-swapped {
  flex-direction: row-reverse;
}

.ns-act-shell.is-chat-hidden .ns-act-panel,
.ns-act-shell.is-iframe-hidden .ns-act-main {
  display: none;
}

.ns-act-shell.is-chat-hidden .ns-act-main,
.ns-act-shell.is-iframe-hidden .ns-act-panel {
  width: 100%;
  max-width: none;
  min-width: 0;
  flex: 1 1 auto;
}

#ns-act-root[data-layout='chat'] .ns-act-panel {
  width: 100%;
  max-width: none;
  min-width: 0;
}

#ns-act-root[data-layout='iframe'] .ns-act-main {
  flex: 1 1 auto;
}

/* Bottom-right hamburger control */
.ns-act-layout-controls {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 16;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.ns-act-layout-toggle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: linear-gradient(180deg, #263243 0%, #1b2534 100%);
  color: #f2f6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(10, 18, 31, 0.32);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.ns-act-layout-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 24px rgba(10, 18, 31, 0.36);
}

.ns-act-layout-toggle svg {
  width: 21px;
  height: 21px;
}

.ns-act-layout-controls.is-open .ns-act-layout-toggle {
  transform: translateY(-1px) rotate(90deg);
}

.ns-act-layout-menu {
  min-width: 232px;
  max-width: min(88vw, 300px);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(100, 120, 155, 0.26);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 14px 30px rgba(11, 19, 33, 0.24);
  backdrop-filter: blur(8px);
}

.ns-act-layout-menu[hidden] {
  display: none !important;
}

.ns-act-layout-item {
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  color: #1e2c42;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
}

.ns-act-layout-item:hover {
  background: rgba(32, 51, 79, 0.08);
}

.ns-act-layout-item.is-active {
  background: rgba(31, 51, 81, 0.12);
}

.ns-act-layout-item-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #44587a;
  flex: 0 0 18px;
}

.ns-act-layout-item-icon svg {
  width: 18px;
  height: 18px;
}

.ns-act-layout-item-text {
  line-height: 1.25;
}

@media (max-width: 767px) {
  .ns-act-shell {
    padding: 8px;
    gap: 8px;
    flex-direction: column;
  }

  .ns-act-shell.is-swapped {
    flex-direction: column-reverse;
  }

  .ns-act-panel,
  .ns-act-main {
    border-radius: 12px;
  }

  .ns-act-panel {
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 45%;
  }

  .ns-act-main {
    min-height: 45%;
  }

  #ns-act-root[data-layout='chat'] .ns-act-panel,
  #ns-act-root[data-layout='iframe'] .ns-act-main {
    height: 100%;
    min-height: 0;
  }

  .ns-act-frame-wrap {
    padding: 8px 8px 0;
  }

  .ns-act-frame-wrap::after {
    inset: 8px 8px 0;
  }

  .ns-act-nav {
    margin: 6px 8px 8px;
    min-height: 38px;
    padding: 4px 6px;
    gap: 4px;
  }

  .ns-act-nav-util-btn span {
    display: none;
  }

  .ns-act-nav-util-btn,
  .ns-act-nav-btn,
  .ns-act-menu-btn {
    padding: 4px 7px;
  }

  .ns-act-layout-controls {
    right: 12px;
    bottom: 12px;
  }

  .ns-act-layout-menu {
    min-width: min(86vw, 280px);
  }
}

@media (prefers-color-scheme: dark) {
  #ns-act-root {
    background:
      radial-gradient(1200px 520px at 50% -200px, rgba(50, 72, 106, 0.28), rgba(14, 18, 24, 0.92)),
      rgba(10, 13, 18, 0.82);
  }

  .ns-act-panel,
  .ns-act-main {
    background: #161d27;
    border-color: rgba(174, 196, 229, 0.16);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  .ns-act-chat {
    background: linear-gradient(180deg, #121923 0%, #101620 100%);
    border-color: rgba(175, 196, 228, 0.15);
  }

  .ns-act-input-wrap,
  .ns-act-powered {
    background: rgba(20, 27, 38, 0.9);
    border-color: rgba(175, 196, 228, 0.15);
  }

  .ns-act-frame-wrap::after {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .ns-act-iframe {
    background: #0f141d;
    border-color: rgba(173, 195, 228, 0.2);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42);
  }

  .ns-act-nav {
    background: rgba(19, 27, 38, 0.92);
    border-color: rgba(173, 195, 228, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .ns-act-close {
    border-color: rgba(173, 195, 228, 0.24);
    background: rgba(25, 34, 47, 0.92);
    color: #ecf2ff;
  }

  .ns-act-layout-toggle {
    border-color: rgba(190, 211, 241, 0.25);
    background: linear-gradient(180deg, #2a3a50 0%, #1c2737 100%);
    color: #eff4ff;
  }

  .ns-act-layout-menu {
    border-color: rgba(173, 195, 228, 0.22);
    background: rgba(18, 27, 39, 0.97);
  }

  .ns-act-layout-item {
    color: #eaf1ff;
  }

  .ns-act-layout-item:hover {
    background: rgba(180, 201, 235, 0.14);
  }

  .ns-act-layout-item.is-active {
    background: rgba(180, 201, 235, 0.2);
  }

  .ns-act-layout-item-icon {
    color: #b7caea;
  }
}

/* ── Message Action Buttons (shopping/navigation) ── */
.ns-act-msg-actions,
.ns-act-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding: 0 2px;
}

.ns-act-msg-action-btn,
.ns-act-product-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border-radius: 8px;
  border: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(243, 156, 18, 0.25);
}

.ns-act-msg-action-btn:hover,
.ns-act-product-btn:hover,
.ns-act-buy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(243, 156, 18, 0.35);
  filter: brightness(1.08);
}

.ns-act-view-btn {
  background: rgba(52, 74, 114, 0.9);
  color: #fff;
}

.ns-act-view-btn:hover {
  background: rgba(52, 74, 114, 1);
}

@media (prefers-color-scheme: dark) {
  .ns-act-msg-action-btn,
  .ns-act-product-btn {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  }

  .ns-act-view-btn {
    background: rgba(180, 201, 235, 0.18);
    color: #d0dff5;
  }

  .ns-act-view-btn:hover {
    background: rgba(180, 201, 235, 0.28);
  }
}
