html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; background: #f3f5f9; overscroll-behavior: none; }
@media (prefers-color-scheme: dark) {
  html:not([data-npm-theme="light"]), body:not([data-npm-theme="light"]) { background: #17191d; }
}
html[data-npm-theme="dark"], body[data-npm-theme="dark"] { background: #17191d; }
@media (display-mode: standalone) {
  html { min-height: min(100lvh, calc(100% + env(safe-area-inset-top, 0px))); }
}

#npm-chat-page {
  --npm-side-w: 268px;
  --npm-side-rail: 60px;
  --npm-side-text-w: 198px;
  --npm-side-ease: cubic-bezier(.32, .72, 0, 1);
  position: fixed; inset: 0; z-index: 1;
  display: flex; flex-direction: row; overflow: hidden;
  font-family: var(--npm-font); background: var(--npm-bg); color: var(--npm-text);
}

#npm-chat-page .npm-side-nav {
  position: relative; z-index: 3; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: stretch;
  box-sizing: border-box; width: var(--npm-side-w); height: 100%; overflow: hidden;
  background: var(--npm-side-bg); border-right: 1px solid var(--npm-side-border);
  padding: calc(10px + env(safe-area-inset-top, 0px)) 8px 10px calc(8px + env(safe-area-inset-left, 0px));
  contain: layout paint;
  transition: width .36s var(--npm-side-ease), box-shadow .36s var(--npm-side-ease);
  animation: npmSideIn .55s cubic-bezier(.16,1,.3,1) both;
}
#npm-chat-page[data-npm-sidebar="collapsed"] .npm-side-nav { width: var(--npm-side-rail); }
@media (min-width: 681px) and (hover: hover) {
  #npm-chat-page[data-npm-sidebar="collapsed"]:not([data-npm-side-nohover="1"]) .npm-side-nav:hover {
    width: var(--npm-side-w);
    box-shadow: 10px 0 32px rgba(2, 6, 23, .12);
  }
  #npm-chat-page[data-npm-sidebar="collapsed"]:not([data-npm-side-nohover="1"]) .npm-side-nav:hover .npm-side-brand-text,
  #npm-chat-page[data-npm-sidebar="collapsed"]:not([data-npm-side-nohover="1"]) .npm-side-nav:hover .npm-side-label {
    opacity: 1;
    transition: opacity .24s ease .06s;
  }
}

#npm-chat-page .npm-side-top {
  display: flex; flex-direction: column; gap: 12px; flex-shrink: 0; align-items: stretch;
  padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px solid var(--npm-side-border);
  animation: npmSideIn .5s cubic-bezier(.16,1,.3,1) both; animation-delay: .08s;
}
#npm-chat-page[data-npm-sidebar="collapsed"] .npm-side-top { align-items: stretch; }

#npm-chat-page .npm-side-toggle {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  box-sizing: border-box; width: 34px; height: 34px; margin: 0 0 10px 5px;
  background: transparent; border: none; border-radius: 9px; color: var(--npm-side-text);
  cursor: pointer; transition: background .15s ease, color .15s ease;
}
#npm-chat-page .npm-side-toggle:hover { background: var(--npm-side-hover-bg); color: var(--npm-side-text-hover); }
#npm-chat-page .npm-side-toggle:active { background: var(--npm-side-hover-bg); }
#npm-chat-page .npm-side-toggle svg { width: 18px; height: 18px; }
#npm-chat-page[data-npm-sidebar="collapsed"] .npm-side-toggle { margin: 0 0 10px 5px; }

#npm-chat-page .npm-side-brand {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  padding: 0 5px; overflow: hidden;
}
#npm-chat-page[data-npm-sidebar="collapsed"] .npm-side-brand {
  justify-content: flex-start; gap: 10px; padding: 0 5px;
}
#npm-chat-page .npm-side-brand .npm-chat-logo {
  flex: 0 0 38px; width: 38px; height: 38px; box-sizing: border-box;
  border-radius: 10px; object-fit: contain; background: #fff; padding: 4px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .08), 0 0 0 1px rgba(15, 23, 42, .06);
}

#npm-chat-page .npm-side-brand-text {
  flex: 0 0 var(--npm-side-text-w); width: var(--npm-side-text-w); max-width: none; min-width: 0;
  display: flex; flex-direction: column; justify-content: center; overflow: hidden;
  opacity: 1; transition: opacity .24s ease .08s;
}
#npm-chat-page[data-npm-sidebar="collapsed"] .npm-side-brand-text {
  width: var(--npm-side-text-w); max-width: none; opacity: 0;
  transition: opacity .14s ease;
}
#npm-chat-page .npm-side-brand-text strong {
  display: block; font-family: 'NgocPhuMedia', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 13.5px; font-weight: 500; line-height: 18px; color: var(--npm-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#npm-chat-page .npm-side-brand-text span,
#npm-chat-page[data-npm-sidebar="collapsed"] .npm-side-brand-text span {
  display: block; font-size: 11px; line-height: 15px; margin-top: 1px;
  color: var(--npm-side-text); opacity: .9;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#npm-chat-page[data-npm-sidebar="collapsed"] .npm-side-brand-text strong { white-space: nowrap; }

#npm-chat-page .npm-theme-icon-wrap {
  position: relative; display: inline-block; flex: 0 0 18px;
  width: 18px; height: 18px; overflow: visible;
}
#npm-chat-page .npm-theme-icon-wrap svg,
#npm-chat-page .npm-side-action .npm-theme-icon-sun,
#npm-chat-page .npm-side-action .npm-theme-icon-moon {
  width: 18px; height: 18px;
}

#npm-chat-page .npm-side-links {
  display: flex; flex-direction: column; gap: 2px;
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
}
#npm-chat-page .npm-side-links::-webkit-scrollbar { display: none; width: 0; height: 0; }

#npm-chat-page .npm-side-bottom {
  flex-shrink: 0; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--npm-side-border);
  display: flex; flex-direction: column; gap: 2px;
  animation: npmSideIn .5s cubic-bezier(.16,1,.3,1) both; animation-delay: .58s;
}

#npm-chat-page .npm-side-link,
#npm-chat-page .npm-side-link:link,
#npm-chat-page .npm-side-link:visited,
#npm-chat-page .npm-side-action {
  position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  box-sizing: border-box; width: 100%; padding: 9px 13px; border-radius: 8px;
  background: transparent; border: none; text-align: left;
  color: var(--npm-side-text) !important; font-size: 13px; font-family: inherit;
  text-decoration: none !important; white-space: nowrap; overflow: hidden; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
#npm-chat-page .npm-side-link { animation: npmSideIn .5s cubic-bezier(.16,1,.3,1) both; }
#npm-chat-page .npm-side-link:hover,
#npm-chat-page .npm-side-link:focus,
#npm-chat-page .npm-side-action:hover {
  background: var(--npm-side-hover-bg); color: var(--npm-side-text-hover) !important; text-decoration: none !important;
}
#npm-chat-page[data-npm-sidebar="collapsed"] .npm-side-link,
#npm-chat-page[data-npm-sidebar="collapsed"] .npm-side-action {
  justify-content: flex-start; gap: 10px; padding: 9px 13px;
}
#npm-chat-page .npm-side-links a:nth-child(1) { animation-delay: .16s; }
#npm-chat-page .npm-side-links a:nth-child(2) { animation-delay: .23s; }
#npm-chat-page .npm-side-links a:nth-child(3) { animation-delay: .30s; }
#npm-chat-page .npm-side-links a:nth-child(4) { animation-delay: .37s; }
#npm-chat-page .npm-side-links a:nth-child(5) { animation-delay: .44s; }
#npm-chat-page .npm-side-links a:nth-child(6) { animation-delay: .51s; }

#npm-chat-page .npm-side-icon,
#npm-chat-page .npm-side-action > svg {
  flex: 0 0 18px; width: 18px; height: 18px;
}

#npm-chat-page .npm-side-label {
  flex: 0 0 auto; max-width: none; overflow: hidden; white-space: nowrap;
  opacity: 1; transition: opacity .24s ease .08s;
}
#npm-chat-page[data-npm-sidebar="collapsed"] .npm-side-label {
  max-width: none; opacity: 0; transition: opacity .14s ease;
}

@keyframes npmSideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

#npm-chat-page .npm-chat-main {
  position: relative; z-index: 0;
  flex: 1; min-width: 0; height: 100%; overflow: hidden;
  display: flex; flex-direction: column;
}
#npm-chat-page .npm-chat-main > .npm-aurora-burst { z-index: 0; }
#npm-chat-page .npm-chat-messages,
#npm-chat-page .npm-image-preview,
#npm-chat-page .npm-chat-inputbar,
#npm-chat-page .npm-chat-note { position: relative; z-index: 1; }

#npm-chat-page .npm-side-backdrop {
  position: fixed; inset: 0; z-index: 2;
  background: rgba(6,10,20,.5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s var(--npm-side-ease), visibility 0s linear .3s;
}
#npm-chat-page .npm-side-open { display: none; }

@media (max-width: 680px), (pointer: coarse) and (max-width: 1100px) {
  #npm-chat-page { --npm-side-w: min(82vw, 300px); }

  #npm-chat-page .npm-side-nav {
    position: fixed; top: auto; right: 0; bottom: 0; left: 0;
    width: min(100%, 30rem); max-width: 100%; height: auto; max-height: min(88vh, 42rem); max-height: min(88dvh, 42rem);
    margin: 0 auto;
    padding: 24px 10px calc(14px + env(safe-area-inset-bottom, 0px));
    border: 1px solid var(--npm-side-border); border-bottom: 0; border-radius: 22px 22px 0 0;
    box-shadow: 0 -10px 40px rgba(0,0,0,.28);
    transform: translateY(0);
    animation: none;
    transition: transform .34s var(--npm-side-ease), box-shadow .34s var(--npm-side-ease);
  }
  #npm-chat-page .npm-side-nav::before {
    content: ''; position: absolute; top: 9px; left: 50%; width: 38px; height: 4px; margin-left: -19px;
    border-radius: 999px; background: var(--npm-side-text); opacity: .28; pointer-events: none;
  }
  #npm-chat-page[data-npm-sidebar="collapsed"] .npm-side-nav {
    width: min(100%, 30rem);
    transform: translateY(105%);
    box-shadow: none;
  }
  #npm-chat-page[data-npm-present="drawer"] .npm-side-nav {
    top: 0; right: 0; bottom: 0; left: auto;
    width: var(--npm-side-w); max-width: none; height: auto; max-height: none; margin: 0;
    padding: calc(14px + env(safe-area-inset-top, 0px)) calc(10px + env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) 10px;
    border: 0; border-radius: 18px 0 0 18px;
    box-shadow: -6px 0 34px rgba(0,0,0,.34);
    transform: translateX(0);
  }
  #npm-chat-page[data-npm-present="drawer"] .npm-side-nav::before { display: none; }
  #npm-chat-page:not([data-npm-present="drawer"]) .npm-side-toggle { display: none; }
  #npm-chat-page[data-npm-present="drawer"][data-npm-sidebar="collapsed"] .npm-side-nav {
    width: var(--npm-side-w);
    transform: translateX(105%);
    box-shadow: none;
  }
  #npm-chat-page[data-npm-snap] .npm-side-nav { transition: none; }

  #npm-chat-page .npm-side-brand-text,
  #npm-chat-page[data-npm-sidebar="collapsed"] .npm-side-brand-text,
  #npm-chat-page .npm-side-label,
  #npm-chat-page[data-npm-sidebar="collapsed"] .npm-side-label {
    opacity: 1; transition: none;
  }

  #npm-chat-page .npm-side-top { animation: none; padding-bottom: 14px; }
  #npm-chat-page .npm-side-link,
  #npm-chat-page .npm-side-bottom { animation: none; }

  #npm-chat-page .npm-side-toggle { width: 40px; height: 40px; margin: 0 0 12px 2px; }
  #npm-chat-page .npm-side-toggle svg { width: 20px; height: 20px; }

  #npm-chat-page .npm-side-brand { padding: 0 2px; gap: 12px; }
  #npm-chat-page .npm-side-brand .npm-chat-logo { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 11px; padding: 5px; }
  #npm-chat-page .npm-side-brand-text { flex: 1 1 auto; width: auto; }
  #npm-chat-page .npm-side-brand-text strong { font-size: 14.5px; line-height: 20px; }
  #npm-chat-page .npm-side-brand-text span { font-size: 11.5px; line-height: 16px; }

  #npm-chat-page .npm-side-links { gap: 4px; padding-top: 4px; }
  #npm-chat-page .npm-side-bottom { gap: 4px; padding-top: 12px; }
  #npm-chat-page .npm-side-link,
  #npm-chat-page .npm-side-link:link,
  #npm-chat-page .npm-side-link:visited,
  #npm-chat-page .npm-side-action,
  #npm-chat-page[data-npm-sidebar="collapsed"] .npm-side-link,
  #npm-chat-page[data-npm-sidebar="collapsed"] .npm-side-action {
    padding: 11px 12px; gap: 14px; font-size: 14.5px; border-radius: 12px;
  }
  #npm-chat-page .npm-side-link:active,
  #npm-chat-page .npm-side-action:active { background: var(--npm-side-hover-bg); }
  #npm-chat-page .npm-side-icon,
  #npm-chat-page .npm-side-action > svg,
  #npm-chat-page .npm-theme-icon-wrap,
  #npm-chat-page .npm-theme-icon-wrap svg,
  #npm-chat-page .npm-side-action .npm-theme-icon-sun,
  #npm-chat-page .npm-side-action .npm-theme-icon-moon {
    flex: 0 0 20px; width: 20px; height: 20px;
  }

  #npm-chat-page:not([data-npm-sidebar="collapsed"]) .npm-side-backdrop {
    opacity: 1; visibility: visible; pointer-events: auto;
    transition: opacity .3s var(--npm-side-ease), visibility 0s;
  }

  #npm-chat-page .npm-side-open {
    position: fixed; z-index: 2;
    top: calc(10px + env(safe-area-inset-top, 0px));
    left: calc(10px + env(safe-area-inset-left, 0px));
    display: flex; align-items: center; justify-content: center;
    box-sizing: border-box; width: 40px; height: 40px; padding: 0;
    border: 1px solid var(--npm-side-border); border-radius: 12px;
    background: var(--npm-side-bg); color: var(--npm-side-text);
    box-shadow: 0 4px 14px rgba(0,0,0,.16); cursor: pointer;
    opacity: 1; transform: scale(1);
    transition: opacity .22s var(--npm-side-ease), transform .22s var(--npm-side-ease);
  }
  #npm-chat-page[data-npm-app] .npm-side-open { left: auto; right: calc(10px + env(safe-area-inset-right, 0px)); }
  #npm-chat-page .npm-side-open svg { width: 20px; height: 20px; }
  #npm-chat-page .npm-side-open:active { background: var(--npm-side-hover-bg); }
  #npm-chat-page:not([data-npm-sidebar="collapsed"]) .npm-side-open {
    opacity: 0; transform: scale(.86); pointer-events: none;
  }

  #npm-chat-page .npm-chat-messages { padding-top: 62px; }
  #npm-chat-page .npm-chat-main .npm-chat-note { padding-top: 4px; padding-bottom: max(18px, calc(env(safe-area-inset-bottom, 0px) + 2px)); }

  #npm-chat-page .npm-side-open,
  #npm-chat-page[data-npm-app] .npm-side-open {
    top: calc(10px + env(safe-area-inset-top, 0px)); left: 0; right: 0; margin: 0 auto;
    gap: 8px; width: -webkit-fit-content; width: fit-content; max-width: calc(100% - 120px); height: 42px; padding: 0 5px;
    border-radius: 999px; color: var(--npm-text);
    box-shadow: 0 8px 24px -8px rgba(2, 6, 23, .28), 0 1px 2px rgba(2, 6, 23, .06);
    transform: none;
  }
  #npm-chat-page[data-npm-app] .npm-side-open { top: calc(8px + env(safe-area-inset-top, 0px)); }
  #npm-chat-page[data-npm-app] .npm-chat-messages { padding-top: calc(58px + env(safe-area-inset-top, 0px)); }
  #npm-chat-page .npm-side-open:active { transform: scale(.97); }
  #npm-chat-page:not([data-npm-sidebar="collapsed"]) .npm-side-open { transform: scale(.86); }
  #npm-chat-page .npm-side-open-logo {
    flex: 0 0 32px; width: 32px; height: 32px; box-sizing: border-box; padding: 3px;
    border-radius: 50%; object-fit: contain; background: #fff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .08);
  }
  #npm-chat-page .npm-side-open-text {
    min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    font-family: 'NgocPhuMedia', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 12.5px; font-weight: 500; line-height: 1.5; padding: 2px 0;
  }
  #npm-chat-page .npm-side-open-ico {
    position: relative; display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px;
    border-radius: 50%; background: var(--npm-side-hover-bg); color: var(--npm-text);
  }
  #npm-chat-page .npm-side-open .npm-side-open-ico svg {
    grid-area: 1 / 1; width: 18px; height: 18px;
    transition: opacity .2s ease, transform .3s var(--npm-side-ease);
  }
  #npm-chat-page .npm-side-open .npm-side-open-close { opacity: 0; transform: rotate(-90deg) scale(.6); }

  #npm-chat-page[data-npm-present="drop"]:not([data-npm-sidebar="collapsed"]) .npm-side-open {
    z-index: 4; opacity: 1; transform: none; pointer-events: auto;
  }
  #npm-chat-page[data-npm-present="drop"]:not([data-npm-sidebar="collapsed"]) .npm-side-open .npm-side-open-menu { opacity: 0; transform: rotate(90deg) scale(.6); }
  #npm-chat-page[data-npm-present="drop"]:not([data-npm-sidebar="collapsed"]) .npm-side-open .npm-side-open-close { opacity: 1; transform: none; }

  #npm-chat-page[data-npm-present="drop"] .npm-side-nav {
    top: calc(62px + env(safe-area-inset-top, 0px)); right: 0; bottom: auto; left: 0;
    width: min(calc(100% - 24px), 23rem); max-width: none; height: auto;
    max-height: calc(100% - 78px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    margin: 0 auto; padding: 12px 10px 10px; overflow-y: auto; overscroll-behavior: contain;
    border: 1px solid var(--npm-glass-line); border-radius: 28px;
    background: var(--npm-glass-strong);
    -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
    box-shadow: 0 30px 70px -18px rgba(2, 6, 23, .45), 0 2px 10px rgba(2, 6, 23, .08), inset 0 1px 0 var(--npm-glass-hi);
    opacity: 1; visibility: visible; pointer-events: auto;
    transform: none; transform-origin: 50% -40px;
    transition: transform .4s cubic-bezier(.16, 1, .3, 1), opacity .22s ease, visibility 0s;
  }
  #npm-chat-page[data-npm-app][data-npm-present="drop"] .npm-side-nav { top: calc(60px + env(safe-area-inset-top, 0px)); }
  #npm-chat-page[data-npm-present="drop"][data-npm-sidebar="collapsed"] .npm-side-nav {
    width: min(calc(100% - 24px), 23rem);
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(-10px) scale(.95);
    transition: transform .24s var(--npm-side-ease), opacity .18s ease, visibility 0s linear .24s;
  }
  #npm-chat-page[data-npm-present="drop"] .npm-side-backdrop {
    background: rgba(6, 10, 20, .34); -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  #npm-chat-page[data-npm-present="drop"] .npm-side-nav::before,
  #npm-chat-page[data-npm-present="drop"] .npm-side-top { display: none; }
  #npm-chat-page[data-npm-present="drop"] .npm-side-links {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 4px;
    flex: 0 0 auto; padding: 0; overflow: visible;
  }
  #npm-chat-page[data-npm-present="drop"] .npm-side-link,
  #npm-chat-page[data-npm-present="drop"] .npm-side-link:link,
  #npm-chat-page[data-npm-present="drop"] .npm-side-link:visited {
    flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 2px 9px; border-radius: 18px; font-size: 12.5px; font-weight: 500; text-align: center;
    background: transparent; color: var(--npm-text) !important;
    opacity: 1; transform: none;
    transition: background .15s ease;
  }
  #npm-chat-page[data-npm-present="drop"] .npm-side-link:active { background: var(--npm-side-hover-bg); }
  #npm-chat-page[data-npm-present="drop"] .npm-side-link .npm-side-icon {
    flex: 0 0 46px; width: 46px; height: 46px; box-sizing: border-box; padding: 12px;
    border-radius: 15px; color: #fff; background: linear-gradient(135deg, #0d6efd, #4f9bff);
    box-shadow: 0 8px 16px -8px rgba(2, 6, 23, .45), inset 0 1px 0 rgba(255, 255, 255, .3);
  }
  #npm-chat-page[data-npm-present="drop"] .npm-side-links a:nth-child(1) .npm-side-icon { background: linear-gradient(135deg, #16a34a, #4ade80); }
  #npm-chat-page[data-npm-present="drop"] .npm-side-links a:nth-child(2) .npm-side-icon { background: linear-gradient(135deg, #0068ff, #4f9bff); }
  #npm-chat-page[data-npm-present="drop"] .npm-side-links a:nth-child(3) .npm-side-icon { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
  #npm-chat-page[data-npm-present="drop"] .npm-side-links a:nth-child(4) .npm-side-icon { background: linear-gradient(135deg, #7c4dff, #b18cff); }
  #npm-chat-page[data-npm-present="drop"] .npm-side-links a:nth-child(5) .npm-side-icon { background: linear-gradient(135deg, #0ea5a4, #34d3c2); }
  #npm-chat-page[data-npm-present="drop"] .npm-side-links a:nth-child(6) .npm-side-icon { background: linear-gradient(135deg, #ec4899, #fb7ab8); }
  #npm-chat-page[data-npm-present="drop"] .npm-side-link .npm-side-label { max-width: 100%; text-overflow: ellipsis; }
  #npm-chat-page[data-npm-present="drop"] .npm-side-bottom {
    gap: 0; margin-top: 10px; padding: 4px; border-top: 0; border-radius: 20px;
    background: var(--npm-glass-card);
    opacity: 1; transform: none;
    transition: none;
  }
  #npm-chat-page[data-npm-present="drop"] .npm-side-action {
    gap: 12px; padding: 7px 10px; border-radius: 15px; font-size: 14px; color: var(--npm-text) !important;
  }
  #npm-chat-page[data-npm-present="drop"] .npm-side-action > svg,
  #npm-chat-page[data-npm-present="drop"] .npm-side-action .npm-theme-icon-wrap {
    flex: 0 0 32px; width: 32px; height: 32px; box-sizing: border-box; padding: 7px;
    border-radius: 10px; color: #fff; background: linear-gradient(135deg, #0d6efd, #4f9bff);
    box-shadow: 0 6px 12px -6px rgba(2, 6, 23, .45), inset 0 1px 0 rgba(255, 255, 255, .28);
  }
  #npm-chat-page[data-npm-present="drop"] .npm-side-action .npm-theme-icon-wrap svg { width: 18px; height: 18px; }
  #npm-chat-page[data-npm-present="drop"] .npm-chat-guide-open > svg { background: linear-gradient(135deg, #0d6efd, #4f9bff); }
  #npm-chat-page[data-npm-present="drop"] .npm-chat-install > svg { background: linear-gradient(135deg, #7c4dff, #b18cff); }
  #npm-chat-page[data-npm-present="drop"] .npm-chat-back > svg { background: linear-gradient(135deg, #64748b, #94a3b8); }
  #npm-chat-page[data-npm-present="drop"] .npm-chat-theme-toggle .npm-theme-icon-wrap { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
  #npm-chat-page[data-npm-present="drop"] .npm-chat-clear > svg { background: linear-gradient(135deg, #ef4444, #fb7185); }
  #npm-chat-page[data-npm-present="drop"] .npm-side-action .npm-side-label { font-weight: 500; }
}

@media (prefers-reduced-motion: reduce) {
  #npm-chat-page .npm-side-nav,
  #npm-chat-page .npm-side-top,
  #npm-chat-page .npm-side-link,
  #npm-chat-page .npm-side-bottom {
    animation: none; opacity: 1; transform: none;
  }
  #npm-chat-page .npm-side-nav,
  #npm-chat-page .npm-side-brand-text,
  #npm-chat-page .npm-side-label,
  #npm-chat-page .npm-side-backdrop,
  #npm-chat-page .npm-side-open,
  #npm-chat-page[data-npm-sidebar="collapsed"] .npm-side-brand-text,
  #npm-chat-page[data-npm-sidebar="collapsed"] .npm-side-label { transition: none; }
}

#npm-chat-page .npm-msg > p:has(+ .npm-msg-actions),
#npm-chat-page .npm-msg > ul:has(+ .npm-msg-actions) { margin-bottom: 0; }
#npm-chat-page .npm-msg-actions {
  display: flex; align-items: center; gap: 2px;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; touch-action: manipulation;
  max-height: 32px; margin: 6px 0 0 -7px; overflow: hidden;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .2s var(--npm-side-ease), transform .24s var(--npm-side-ease);
}
#npm-chat-page .npm-msg.npm-streaming { margin-bottom: 34px; }
#npm-chat-page .npm-msg.bot:last-of-type .npm-msg-actions,
#npm-chat-page .npm-msg.bot:hover .npm-msg-actions,
#npm-chat-page .npm-msg.bot:focus-within .npm-msg-actions {
  opacity: 1; transform: translateY(0); pointer-events: auto;
}
#npm-chat-page .npm-msg-copy,
#npm-chat-page .npm-msg-speak {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; box-sizing: border-box;
  width: 28px; height: 28px; margin: 0; padding: 0; border: none; vertical-align: baseline;
  background: transparent; color: var(--npm-text-secondary, var(--npm-speak-color));
  border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
#npm-chat-page .npm-msg-copy svg,
#npm-chat-page .npm-msg-speak svg { width: 15px; height: 15px; }
@media (hover: hover) {
  #npm-chat-page .npm-msg-copy:hover,
  #npm-chat-page .npm-msg-speak:hover {
    background: var(--npm-speak-hover-bg); color: var(--npm-text);
  }
}
#npm-chat-page .npm-msg-copy.npm-copy-done,
#npm-chat-page .npm-msg-speak.npm-speaking {
  background: transparent; color: var(--npm-blue);
}
#npm-chat-page .npm-msg-time {
  display: block; margin-left: 7px; font-size: 11.5px; line-height: 1;
  color: var(--npm-text-secondary, var(--npm-speak-color)); opacity: .75;
  white-space: nowrap; -webkit-user-select: none; user-select: none;
}

@media (hover: none), (max-width: 680px) {
  #npm-chat-page .npm-msg.npm-streaming { margin-bottom: 40px; }
  #npm-chat-page .npm-msg-actions {
    max-height: 38px; opacity: 1; transform: translateY(0); pointer-events: auto;
    margin: 4px 0 0 -8px; gap: 4px;
  }
  #npm-chat-page .npm-msg-copy,
  #npm-chat-page .npm-msg-speak { width: 36px; height: 36px; border-radius: 10px; }
  #npm-chat-page .npm-msg-copy svg,
  #npm-chat-page .npm-msg-speak svg { width: 17px; height: 17px; }
  #npm-chat-page .npm-msg-copy:active,
  #npm-chat-page .npm-msg-speak:active { background: var(--npm-speak-hover-bg); }
  #npm-chat-page .npm-msg-time { font-size: 12px; margin-left: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  #npm-chat-page .npm-msg-actions { transition: none; }
}

#npm-chat-page .npm-chat-inputbar {
  max-width: 880px; width: calc(100% - 28px); margin: 0 auto 10px;
  display: flex; align-items: center; gap: 4px;
  padding: 6px 6px 6px 14px; border-radius: 26px;
  border: 1px solid var(--npm-composer-border);
  background: linear-gradient(180deg, var(--npm-composer-highlight), transparent 55%), var(--npm-composer-bg);
  -webkit-backdrop-filter: blur(24px) saturate(180%) contrast(112%);
  backdrop-filter: blur(24px) saturate(180%) contrast(112%);
  box-shadow: var(--npm-composer-shadow), inset 0 1px 0 var(--npm-composer-inset), inset 0 -1px 0 rgba(0,0,0,.03);
  transition: border-color .18s var(--npm-side-ease), box-shadow .18s var(--npm-side-ease), background .18s var(--npm-side-ease);
}
#npm-chat-page .npm-chat-inputbar:focus-within {
  border-color: var(--npm-composer-border-focus);
  box-shadow: var(--npm-composer-shadow-focus), inset 0 1px 0 var(--npm-composer-inset), inset 0 -1px 0 rgba(0,0,0,.03);
}
#npm-chat-page .npm-chat-inputbar:has(.npm-input-multiline) { border-radius: 22px; }
#npm-chat-page .npm-chat-inputbar.npm-tools-open { z-index: 6; }

#npm-chat-page .npm-chat-input {
  padding: 8px 6px; font-size: 14.5px; line-height: 1.45; max-height: 200px;
  caret-color: var(--npm-blue);
  transition: height .14s var(--npm-side-ease), color .3s ease;
}

#npm-chat-page .npm-chat-send {
  width: 36px; height: 36px;
  transition: background .18s ease, transform .18s cubic-bezier(.34,1.4,.64,1), opacity .18s ease;
}
#npm-chat-page .npm-chat-send svg {
  width: 18px; height: 18px; fill: currentColor; stroke: none;
}
#npm-chat-page .npm-chat-send:hover:not(:disabled) { transform: scale(1.05); }
#npm-chat-page .npm-chat-send:active:not(:disabled) { transform: scale(.94); }

#npm-chat-page .npm-chat-tools,
#npm-chat-page .npm-chat-attach,
#npm-chat-page .npm-chat-mic { width: 36px; height: 36px; }
#npm-chat-page .npm-chat-tools svg,
#npm-chat-page .npm-chat-attach svg,
#npm-chat-page .npm-chat-mic svg { width: 18px; height: 18px; }

@media (max-width: 680px) {
  #npm-chat-page .npm-chat-inputbar {
    width: calc(100% - 20px); margin: 0 auto 8px;
    padding: 5px 5px 5px 10px; border-radius: 24px;
  }
  #npm-chat-page .npm-chat-input { font-size: 13.5px; line-height: 1.4; padding: 8px 4px; }
  #npm-chat-page .npm-chat-input::placeholder { font-size: 13px; }
  #npm-chat-page .npm-chat-send,
  #npm-chat-page .npm-chat-tools,
  #npm-chat-page .npm-chat-attach,
  #npm-chat-page .npm-chat-mic { width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  #npm-chat-page .npm-chat-inputbar,
  #npm-chat-page .npm-chat-input,
  #npm-chat-page .npm-chat-send { transition: none; }
}

#npm-chat-page .npm-chat-messages { padding-bottom: 16px; margin-bottom: 0; }
#npm-chat-page .npm-image-preview,
#npm-chat-page .npm-chat-inputbar,
#npm-chat-page .npm-chat-note { z-index: 2; }
#npm-chat-page .npm-image-preview {
  background: linear-gradient(180deg, var(--npm-composer-highlight), transparent 55%), var(--npm-composer-bg);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(24px) saturate(180%) contrast(112%);
  backdrop-filter: blur(24px) saturate(180%) contrast(112%);
}

#npm-chat-page .npm-chat-note {
  background: transparent; color: var(--npm-text-secondary);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  -webkit-mask-image: none; mask-image: none;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}

@media (hover: none) {
  #npm-chat-page .npm-chat-inputbar,
  #npm-chat-page .npm-image-preview {
    -webkit-backdrop-filter: blur(14px) saturate(150%) contrast(108%);
    backdrop-filter: blur(14px) saturate(150%) contrast(108%);
  }
}

#npm-chat-page:not([data-npm-side-ready]) .npm-side-nav,
#npm-chat-page:not([data-npm-side-ready]) .npm-side-brand-text,
#npm-chat-page:not([data-npm-side-ready]) .npm-side-label,
#npm-chat-page:not([data-npm-side-ready]) .npm-side-backdrop,
#npm-chat-page:not([data-npm-side-ready]) .npm-side-open {
  transition: none;
}
@media (max-width: 680px), (pointer: coarse) and (max-width: 1100px) {
  #npm-chat-page .npm-tools-backdrop {
    position: fixed; inset: 0; z-index: 59; display: block;
    background: rgba(2, 6, 23, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    opacity: 1; visibility: visible; will-change: opacity;
    transition: opacity .44s var(--npm-side-ease), visibility 0s;
  }
  #npm-chat-page .npm-tools-backdrop[hidden] {
    display: block !important; opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .4s var(--npm-side-ease), visibility 0s linear .4s;
  }
  #npm-chat-page .npm-tools-panel {
    position: fixed; z-index: 60; display: block; box-sizing: border-box; margin: 0; overflow-y: auto;
    visibility: visible; animation: none; will-change: transform;
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
    overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    transition: transform .44s var(--npm-side-ease), visibility 0s, box-shadow .44s ease;
  }
  #npm-chat-page .npm-tools-panel[hidden] {
    display: block !important; visibility: hidden; pointer-events: none; box-shadow: none;
    transition: transform .4s var(--npm-side-ease), visibility 0s linear .4s, box-shadow .4s ease;
  }
  #npm-chat-page .npm-tools-panel[data-present="sheet"] {
    top: auto; bottom: 0; left: 0; right: 0; width: min(100%, 34rem); height: auto; max-height: 88vh; max-height: 88dvh;
    padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    border-width: 1px 1px 0; border-radius: 24px 24px 0 0;
    box-shadow: 0 -16px 48px rgba(2, 6, 23, .28);
    transform: translate3d(0, 0, 0); transform-origin: center bottom;
  }
  #npm-chat-page .npm-tools-panel[data-present="sheet"][hidden] { transform: translate3d(0, 104%, 0); }
  #npm-chat-page .npm-tools-panel[data-present="sheet"]::before {
    content: ""; position: static; display: block; float: none; width: 2.5rem; height: 4px; margin: 0 auto 12px;
    transform: none; border-radius: 4px; background: var(--npm-border-strong); opacity: .55; pointer-events: none;
  }
  #npm-chat-page .npm-tools-panel[data-present="right"] {
    top: 0; bottom: 0; left: auto; right: 0; width: min(88vw, 390px); height: auto; max-height: none;
    padding: calc(16px + env(safe-area-inset-top, 0px)) calc(14px + env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) 16px;
    border-width: 0 0 0 1px; border-radius: 24px 0 0 24px;
    box-shadow: -16px 0 48px rgba(2, 6, 23, .28);
    transform: translate3d(0, 0, 0); transform-origin: right center;
  }
  #npm-chat-page .npm-tools-panel[data-present="right"][hidden] { transform: translate3d(104%, 0, 0); }
  #npm-chat-page .npm-tools-panel[data-present="right"]::before {
    content: ""; position: sticky; top: 50%; float: left; width: 4px; height: 38px; margin-left: -10px;
    transform: translateY(-50%); border-radius: 4px; background: var(--npm-border-strong); opacity: .55; pointer-events: none;
  }
}

#npm-chat-page {
  --npm-glass: rgba(248, 250, 253, .8);
  --npm-glass-strong: rgba(250, 251, 253, .86);
  --npm-glass-card: rgba(15, 23, 42, .045);
  --npm-glass-line: rgba(15, 23, 42, .1);
  --npm-glass-hi: rgba(255, 255, 255, .7);
}
#npm-chat-page[data-npm-theme="dark"] {
  --npm-glass: rgba(30, 34, 42, .78);
  --npm-glass-strong: rgba(30, 34, 42, .86);
  --npm-glass-card: rgba(255, 255, 255, .05);
  --npm-glass-line: rgba(255, 255, 255, .1);
  --npm-glass-hi: rgba(255, 255, 255, .06);
}
@media (prefers-color-scheme: dark) {
  #npm-chat-page:not([data-npm-theme="light"]) {
    --npm-glass: rgba(30, 34, 42, .78);
    --npm-glass-strong: rgba(30, 34, 42, .86);
    --npm-glass-card: rgba(255, 255, 255, .05);
    --npm-glass-line: rgba(255, 255, 255, .1);
    --npm-glass-hi: rgba(255, 255, 255, .06);
  }
}
#npm-chat-page .npm-chat-main .npm-chat-messages {
  padding-bottom: calc(16px + var(--npm-dock, 0px));
  margin-bottom: calc(0px - var(--npm-dock, 0px));
}
#npm-chat-page .npm-chat-main .npm-chat-inputbar {
  background: var(--npm-glass);
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
}
@media (max-width: 680px), (pointer: coarse) and (max-width: 1100px) {
  #npm-chat-page .npm-side-open.npm-side-action,
  #npm-chat-page .npm-side-open {
    border-color: var(--npm-glass-line);
    background: var(--npm-glass-strong);
    -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
    box-shadow: 0 8px 24px -8px rgba(2, 6, 23, .28), 0 1px 2px rgba(2, 6, 23, .06), inset 0 1px 0 var(--npm-glass-hi);
  }
}
@media (prefers-reduced-transparency: reduce) {
  #npm-chat-page .npm-chat-main .npm-chat-inputbar,
  #npm-chat-page .npm-side-open,
  #npm-chat-page[data-npm-present="drop"] .npm-side-nav {
    background: var(--npm-side-bg); -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  #npm-chat-page[data-npm-present="drop"] .npm-side-nav,
  #npm-chat-page[data-npm-present="drop"] .npm-side-link,
  #npm-chat-page[data-npm-present="drop"] .npm-side-bottom { transition: opacity .15s ease, visibility 0s; transform: none; }
}

#npm-chat-page .npm-chat-messages .npm-onboard-card:not(.npm-onboard-full),
#npm-chat-page .npm-chat-messages .npm-chat-tip,
#npm-chat-page .npm-chat-main > .npm-chat-tip { display: none; }
@media (max-width: 680px), (pointer: coarse) and (max-width: 1100px) {
  #npm-chat-page .npm-chat-main .npm-chat-suggest {
    flex-wrap: nowrap; justify-content: flex-start; gap: 8px;
    padding: 4px 12px 10px; overflow-x: auto; overflow-y: hidden;
    overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity; scroll-padding: 0 12px; scrollbar-width: none;
  }
  #npm-chat-page .npm-chat-main .npm-chat-suggest::-webkit-scrollbar { display: none; }
  #npm-chat-page .npm-chat-main .npm-chat-suggest > * { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }
}
#npm-chat-page .npm-chat-main .npm-chat-input { padding-top: 10px; padding-bottom: 6px; }
#npm-chat-page .npm-chat-messages .npm-msg.user { font-size: 14.5px; line-height: 1.55; }
#npm-chat-page .npm-side-open-ai {
  display: inline-block; margin-left: 3px; padding: 2px 6px 1px; border-radius: 7px;
  font-weight: 700; font-size: 11.5px; line-height: 1.25; letter-spacing: .4px; color: #fff; vertical-align: 1px;
  background: linear-gradient(120deg, #2f7bff 0%, #8b5cf6 55%, #ec4899 100%);
  box-shadow: 0 2px 8px -2px rgba(139, 92, 246, .6), inset 0 1px 0 rgba(255, 255, 255, .35);
}
