/* 从普通层收来、必须压厂商皮肤的规则。普通层不再写 !important。 */

/* from paint.css */
html[data-tt-shell] .list-group-item.active {
  color: var(--tt-accent-ink) !important;
  background-color: var(--tt-primary) !important;
  border-color: var(--tt-primary) !important;
}

html[data-tt-shell] .dropdown-item.active {
  color: var(--tt-primary-emphasis) !important;
  background-color: var(--tt-primary-subtle) !important;
}

html[data-tt-shell] .text-primary {
  color: var(--tt-primary-link) !important;
}

html[data-tt-shell] .text-primary-emphasis {
  color: var(--tt-primary-emphasis) !important;
}

html[data-tt-shell] .bg-primary {
  background-color: var(--tt-primary) !important;
}

html[data-tt-shell] .text-bg-primary,
html[data-tt-shell] .badge.bg-primary {
  color: var(--tt-accent-ink) !important;
  background-color: var(--tt-primary) !important;
}

html[data-tt-shell] .bg-primary-subtle,
html[data-tt-shell] .bg-soft-primary {
  background-color: var(--tt-primary-subtle) !important;
}

html[data-tt-shell] .border-primary {
  border-color: var(--tt-primary) !important;
}

/* from chrome.css */
.tt-chrome-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--tt-control-h, 2.25rem);
    height: var(--tt-control-h, 2.25rem);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    overflow: visible !important;
}

.tt-chrome-badge[hidden] {
    display: none !important;
}

[data-tt-appearance-cycle] [data-tt-icon] {
    display: none !important;
}

html[data-tt-tone="light"] [data-tt-appearance-cycle] [data-tt-icon="sun"],
html:not([data-bs-theme="dark"]):not([data-tt-eye]) [data-tt-appearance-cycle] [data-tt-icon="sun"],
html[data-tt-tone="eye"] [data-tt-appearance-cycle] [data-tt-icon="eye"],
html[data-tt-eye="1"] [data-tt-appearance-cycle] [data-tt-icon="eye"],
html[data-tt-tone="dark"] [data-tt-appearance-cycle] [data-tt-icon="moon"],
html[data-bs-theme="dark"] [data-tt-appearance-cycle] [data-tt-icon="moon"] {
    display: block !important;
}

.app-header,
.navbar,
.chathive-main-header,
.chathive-main-header-right,
.tt-chrome {
    overflow: visible !important;
}

.app-header .tt-chrome .dropdown-menu,
.navbar .tt-chrome .dropdown-menu,
.chathive-main-header-right .tt-chrome .dropdown-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: 0 !important;
    z-index: 1085;
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, inherit);
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: var(--tt-radius-md, 0.5rem);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
    font-size: 0.875rem;
}

.tt-user-menu .dropdown-item:hover,
.tt-user-menu .dropdown-item:focus,
.tt-user-menu .dropdown-item:active {
    background-color: rgba(var(--tt-accent-rgb, var(--chathive-primary-rgb, var(--bs-primary-rgb, 51, 65, 85))), 0.16) !important;
    color: var(--chathive-dropdown-link-hover-color, var(--bs-body-color, inherit)) !important;
}

html[data-tt-elder="1"] *,
html[data-tt-elder="1"] *::before,
html[data-tt-elder="1"] *::after,
html[data-tt-elder="2"] *,
html[data-tt-elder="2"] *::before,
html[data-tt-elder="2"] *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.08s !important;
    scroll-behavior: auto !important;
}

html[data-tt-shell="unify"] .text-primary,
html[data-tt-shell="smartadmin"] .text-primary {
    color: var(--tt-primary-link) !important;
}

html[data-tt-shell="unify"] .bg-primary,
html[data-tt-shell="smartadmin"] .bg-primary {
    --bs-bg-opacity: 1;
    background-color: rgba(var(--tt-accent-rgb, var(--bs-primary-rgb)), var(--bs-bg-opacity)) !important;
}

html[data-tt-shell="unify"] .bg-soft-primary,
html[data-tt-shell="smartadmin"] .bg-soft-primary {
    background-color: var(--tt-primary-subtle) !important;
}

html[data-tt-shell="unify"] .text-bg-primary,
html[data-tt-shell="smartadmin"] .text-bg-primary {
    background-color: var(--tt-primary) !important;
    color: var(--tt-accent-ink) !important;
}

/* from stage.css */
/* ChatHive：禁止外壳自己做 width/margin 过渡，否则换页会左右拽。 */
html[data-tt-shell='chathive'] .chathive-content,
html[data-tt-shell='chathive'] #tt-chathive-aside,
html[data-tt-shell='chathive'] .chathive-navigation,
html[data-tt-shell='chathive'] .chathive-navigation .nav-link,
html[data-tt-shell='chathive'] .micro-stage,
html[data-tt-shell='chathive'] .micro-layer {
  transition: none !important;
}

@media (min-width: 992px) {
  /* 仅当中间栏确有当前插件 Teleport 的内容时才让出宽；空栏由 shell.css 的
     无条件规则收回为单导航宽（旧写法无条件 !important，压死了 shell.css 的
     :has 回收机制，导致无中间栏页面常驻 400px 白边）。 */
  html[data-tt-shell='chathive'] body:has(#tt-chathive-aside > .tt-aside-pane.is-front > *) .chathive-content {
    margin-left: calc(var(--chathive-navigation-width, 6rem) + var(--chathive-asidebar-width, 25rem)) !important;
  }}

/* 仅 swap 过渡态保持中间栏布局；空态的显隐由 shell.css 按 :has 内容判定
   （空栏 display:none）。旧写法第一条选择器对空栏也 display:flex !important，
   与 shell.css 同特异性的 display:none !important 撞车，加载顺序一变就让
   空中间栏常驻 400px 盖住无中间栏页面的标题。 */
html.tt-plugin-swap[data-tt-shell='chathive'] #tt-chathive-aside {
  display: flex !important;
  flex-direction: column;
  background: var(--bs-body-bg, #fff);
}

html:not([data-tt-shell='chathive']) #tt-chathive-aside {
  display: none !important;
}
.tt-skel-bar-lg { width: 42% !important; height: 16px; }
.tt-skel-bar-sm { width: 38% !important; }

/* from tone-smartadmin.css */
html[data-tt-shell="smartadmin"][data-tt-eye="1"] .text-muted,
html[data-tt-shell="smartadmin"][data-tt-eye="1"] .text-body-secondary {
    color: #6b5c48 !important;
}

html[data-tt-shell="smartadmin"][data-tt-eye="1"] .bg-white,
html[data-tt-shell="smartadmin"][data-tt-eye="1"] .bg-light,
html[data-tt-shell="smartadmin"][data-tt-eye="1"] .bg-body {
    background-color: #f6efdc !important;
}

/* from tone-unify.css */
html[data-tt-shell="unify"][data-bs-theme="dark"] #header,
html[data-tt-shell="unify"][data-bs-theme="dark"] #header.navbar,
html[data-tt-shell="unify"][data-bs-theme="dark"] #header.navbar-light,
html[data-tt-shell="unify"][data-bs-theme="dark"] #header.navbar-dark,
html[data-tt-shell="unify"][data-bs-theme="dark"] #header .container,
html[data-tt-shell="unify"][data-bs-theme="dark"] #header .navbar-absolute-top-scroller,
html[data-tt-shell="unify"][data-bs-theme="dark"] #header .navbar-collapse,
html[data-tt-shell="unify"][data-bs-theme="dark"] #header .navbar-nav-wrap,
html[data-tt-shell="unify"][data-bs-theme="dark"] #header .nav-pills,
html[data-tt-shell="unify"][data-bs-theme="dark"] #header .nav-pills .nav-link,
html[data-tt-shell="unify"][data-bs-theme="dark"] #header .nav-pills .nav-link.active,
html[data-tt-shell="unify"][data-bs-theme="dark"] #header .nav-pills .show > .nav-link,
html[data-tt-shell="unify"][data-bs-theme="dark"] #header .bg-white,
html[data-tt-shell="unify"][data-bs-theme="dark"] #header .bg-light,
html[data-tt-shell="unify"][data-bs-theme="dark"] #header .bg-body {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    --bs-navbar-bg: transparent;
    --bs-nav-pills-link-active-bg: transparent;
}

html[data-tt-shell="unify"][data-bs-theme="dark"] #header.navbar.navbar-scrolled {
    --bs-navbar-bg: #12151c;
    background: #12151c !important;
    background-color: #12151c !important;
    box-shadow: 0 0.375rem 1.5rem 0 rgba(0, 0, 0, 0.35) !important;
}

html[data-tt-shell="unify"][data-bs-theme="dark"] .bg-white,
html[data-tt-shell="unify"][data-bs-theme="dark"] .bg-light,
html[data-tt-shell="unify"][data-bs-theme="dark"] .bg-body,
html[data-tt-shell="unify"][data-bs-theme="dark"] .bg-soft-light,
html[data-tt-shell="unify"][data-bs-theme="dark"] .bg-soft-secondary {
    background-color: #1b2030 !important;
    color: #d7dde8 !important;
}

html[data-tt-shell="unify"][data-bs-theme="dark"] .text-dark,
html[data-tt-shell="unify"][data-bs-theme="dark"] .text-black {
    color: #f1f4f9 !important;
}

html[data-tt-shell="unify"][data-bs-theme="dark"] .page-header,
html[data-tt-shell="unify"][data-bs-theme="dark"] .breadcrumb,
html[data-tt-shell="unify"][data-bs-theme="dark"] .pagination .page-link,
html[data-tt-shell="unify"][data-bs-theme="dark"] .input-group-text,
html[data-tt-shell="unify"][data-bs-theme="dark"] .nav-tabs,
html[data-tt-shell="unify"][data-bs-theme="dark"] .nav-tabs .nav-link,
html[data-tt-shell="unify"][data-bs-theme="dark"] .table-light,
html[data-tt-shell="unify"][data-bs-theme="dark"] .btn-light,
html[data-tt-shell="unify"][data-bs-theme="dark"] .btn-white,
html[data-tt-shell="unify"][data-bs-theme="dark"] .bg-body-tertiary,
html[data-tt-shell="unify"][data-bs-theme="dark"] .bg-body-secondary,
html[data-tt-shell="unify"][data-bs-theme="dark"] .modal-header,
html[data-tt-shell="unify"][data-bs-theme="dark"] .modal-footer,
html[data-tt-shell="unify"][data-bs-theme="dark"] .offcanvas-header,
html[data-tt-shell="unify"][data-bs-theme="dark"] .offcanvas-body,
html[data-tt-shell="unify"][data-bs-theme="dark"] .alert-light {
    background-color: #1b2030 !important;
    color: #d7dde8;
    border-color: #2e3648;
}

html[data-tt-shell="unify"][data-bs-theme="dark"] .border,
html[data-tt-shell="unify"][data-bs-theme="dark"] .border-top,
html[data-tt-shell="unify"][data-bs-theme="dark"] .border-bottom,
html[data-tt-shell="unify"][data-bs-theme="dark"] .border-start,
html[data-tt-shell="unify"][data-bs-theme="dark"] .border-end {
    border-color: #2e3648 !important;
}

html[data-tt-shell="unify"][data-tt-eye="1"] #header,
html[data-tt-shell="unify"][data-tt-eye="1"] #header.navbar,
html[data-tt-shell="unify"][data-tt-eye="1"] #header.navbar-light,
html[data-tt-shell="unify"][data-tt-eye="1"] #header .container,
html[data-tt-shell="unify"][data-tt-eye="1"] #header .navbar-absolute-top-scroller,
html[data-tt-shell="unify"][data-tt-eye="1"] #header .navbar-collapse,
html[data-tt-shell="unify"][data-tt-eye="1"] #header .navbar-nav-wrap,
html[data-tt-shell="unify"][data-tt-eye="1"] #header .nav-pills,
html[data-tt-shell="unify"][data-tt-eye="1"] #header .nav-pills .nav-link,
html[data-tt-shell="unify"][data-tt-eye="1"] #header .nav-pills .nav-link.active,
html[data-tt-shell="unify"][data-tt-eye="1"] #header .nav-pills .show > .nav-link,
html[data-tt-shell="unify"][data-tt-eye="1"] #header .bg-white,
html[data-tt-shell="unify"][data-tt-eye="1"] #header .bg-light,
html[data-tt-shell="unify"][data-tt-eye="1"] #header .bg-body {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    --bs-navbar-bg: transparent;
    --bs-nav-pills-link-active-bg: transparent;
}

html[data-tt-shell="unify"][data-tt-eye="1"] #header.navbar.navbar-scrolled {
    --bs-navbar-bg: #f4ecd8;
    background: #f4ecd8 !important;
    background-color: #f4ecd8 !important;
    box-shadow: 0 0.375rem 1.5rem 0 rgba(80, 60, 30, 0.12) !important;
}

html[data-tt-shell="unify"][data-tt-eye="1"] .bg-white,
html[data-tt-shell="unify"][data-tt-eye="1"] .bg-light,
html[data-tt-shell="unify"][data-tt-eye="1"] .bg-body,
html[data-tt-shell="unify"][data-tt-eye="1"] .bg-soft-light,
html[data-tt-shell="unify"][data-tt-eye="1"] .bg-soft-secondary {
    background-color: #f6efdc !important;
    color: #4a3f2f !important;
}

html[data-tt-shell="unify"][data-tt-eye="1"] .text-dark,
html[data-tt-shell="unify"][data-tt-eye="1"] .text-black {
    color: #3d3428 !important;
}

html[data-tt-shell="unify"][data-tt-eye="1"] .page-header,
html[data-tt-shell="unify"][data-tt-eye="1"] .breadcrumb,
html[data-tt-shell="unify"][data-tt-eye="1"] .pagination .page-link,
html[data-tt-shell="unify"][data-tt-eye="1"] .input-group-text,
html[data-tt-shell="unify"][data-tt-eye="1"] .nav-tabs,
html[data-tt-shell="unify"][data-tt-eye="1"] .nav-tabs .nav-link,
html[data-tt-shell="unify"][data-tt-eye="1"] .table-light,
html[data-tt-shell="unify"][data-tt-eye="1"] .btn-light,
html[data-tt-shell="unify"][data-tt-eye="1"] .btn-white,
html[data-tt-shell="unify"][data-tt-eye="1"] .bg-body-tertiary,
html[data-tt-shell="unify"][data-tt-eye="1"] .bg-body-secondary,
html[data-tt-shell="unify"][data-tt-eye="1"] .modal-header,
html[data-tt-shell="unify"][data-tt-eye="1"] .modal-footer,
html[data-tt-shell="unify"][data-tt-eye="1"] .offcanvas-header,
html[data-tt-shell="unify"][data-tt-eye="1"] .offcanvas-body,
html[data-tt-shell="unify"][data-tt-eye="1"] .alert-light {
    background-color: #f6efdc !important;
    color: #4a3f2f;
    border-color: #d9c9a3;
}

/* 顶栏选中仍是实心胶囊。上面把整条导航抹成透明，护眼和黑天会把胶囊一起抹掉。 */
html[data-tt-shell="unify"][data-bs-theme="dark"] #header.unify-header .nav-pills .nav-link.active,
html[data-tt-shell="unify"][data-bs-theme="dark"] #header.unify-header .nav-pills .show > .nav-link,
html[data-tt-shell="unify"][data-tt-eye="1"] #header.unify-header .nav-pills .nav-link.active,
html[data-tt-shell="unify"][data-tt-eye="1"] #header.unify-header .nav-pills .show > .nav-link {
    color: var(--tt-accent-ink, #fff) !important;
    background: var(--tt-accent) !important;
    background-color: var(--tt-accent) !important;
    box-shadow: none !important;
}

/* from tone.css */
html[data-tt-eye="1"]:not([data-tt-shell="smartadmin"]) .text-muted,
html[data-tt-eye="1"]:not([data-tt-shell="smartadmin"]) .text-body-secondary {
    color: #6b5c48 !important;
}

/* from surface.css */
/* 三壳表面：token 覆盖顶栏 / 导航 / 主区 / 页脚 / 卡片槽。Unify 粘性顶栏用表面色，不用 PHP 透明叠层。
   SmartAdmin 白天/黑夜走 vendor + Bootstrap；护眼见 tone-smartadmin.css。 */

html[data-tt-shell="chathive"] .chathive-navigation,
html[data-tt-shell="chathive"] .chathive-navigation.bg-body-tertiary {
    background-color: var(--tt-tone-muted, var(--chathive-bg-body-tertiary, var(--bs-tertiary-bg))) !important;
    border-color: var(--tt-tone-border, var(--chathive-border-color, var(--bs-border-color))) !important;
    color: var(--tt-tone-fg, var(--chathive-body-color, inherit));
}

html[data-tt-shell="chathive"] .chathive-main-header,
html[data-tt-shell="chathive"] .chathive-main-header.bg-body {
    background-color: var(--tt-tone-surface, var(--chathive-bg-white, var(--bs-body-bg))) !important;
    border-color: var(--tt-tone-border, var(--chathive-border-color, var(--bs-border-color))) !important;
    color: var(--tt-tone-fg, var(--chathive-body-color, inherit));
}

html[data-tt-shell="unify"] #header.unify-header,
html[data-tt-shell="unify"] #header.unify-header.navbar,
html[data-tt-shell="unify"] #header.unify-header.navbar-light {
    background: var(--tt-tone-surface, #fff) !important;
    background-color: var(--tt-tone-surface, #fff) !important;
    box-shadow: 0 1px 8px var(--tt-tone-shadow, rgba(45, 55, 75, 0.08)) !important;
}

html[data-tt-typeface="song"],
html[data-tt-typeface="song"] body,
html[data-tt-typeface="song"] input,
html[data-tt-typeface="song"] textarea,
html[data-tt-typeface="song"] select,
html[data-tt-typeface="song"] button,
html[data-tt-typeface="song"] .btn,
html[data-tt-typeface="song"] .nav-link,
html[data-tt-typeface="song"] .dropdown-item,
html[data-tt-typeface="song"] .form-control,
html[data-tt-typeface="song"] .form-select {
    font-family: SimSun, "Songti SC", "NSimSun", "Noto Serif SC", serif !important;
}
html[data-tt-typeface="kai"],
html[data-tt-typeface="kai"] body,
html[data-tt-typeface="kai"] input,
html[data-tt-typeface="kai"] textarea,
html[data-tt-typeface="kai"] select,
html[data-tt-typeface="kai"] button,
html[data-tt-typeface="kai"] .btn,
html[data-tt-typeface="kai"] .nav-link,
html[data-tt-typeface="kai"] .dropdown-item,
html[data-tt-typeface="kai"] .form-control,
html[data-tt-typeface="kai"] .form-select {
    font-family: KaiTi, STKaiti, "Kaiti SC", "Noto Serif SC", serif !important;
}
html[data-tt-typeface="fang"],
html[data-tt-typeface="fang"] body,
html[data-tt-typeface="fang"] input,
html[data-tt-typeface="fang"] textarea,
html[data-tt-typeface="fang"] select,
html[data-tt-typeface="fang"] button,
html[data-tt-typeface="fang"] .btn,
html[data-tt-typeface="fang"] .nav-link,
html[data-tt-typeface="fang"] .dropdown-item,
html[data-tt-typeface="fang"] .form-control,
html[data-tt-typeface="fang"] .form-select {
    font-family: FangSong, STFangsong, "Fangsong SC", "Noto Serif SC", serif !important;
}
html[data-tt-typeface="hei"],
html[data-tt-typeface="hei"] body,
html[data-tt-typeface="hei"] input,
html[data-tt-typeface="hei"] textarea,
html[data-tt-typeface="hei"] select,
html[data-tt-typeface="hei"] button,
html[data-tt-typeface="hei"] .btn,
html[data-tt-typeface="hei"] .nav-link,
html[data-tt-typeface="hei"] .dropdown-item,
html[data-tt-typeface="hei"] .form-control,
html[data-tt-typeface="hei"] .form-select {
    font-family: SimHei, STHeiti, "Heiti SC", "Noto Sans SC", sans-serif !important;
}
html[data-tt-typeface="yahei"],
html[data-tt-typeface="yahei"] body,
html[data-tt-typeface="yahei"] input,
html[data-tt-typeface="yahei"] textarea,
html[data-tt-typeface="yahei"] select,
html[data-tt-typeface="yahei"] button,
html[data-tt-typeface="yahei"] .btn,
html[data-tt-typeface="yahei"] .nav-link,
html[data-tt-typeface="yahei"] .dropdown-item,
html[data-tt-typeface="yahei"] .form-control,
html[data-tt-typeface="yahei"] .form-select {
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif !important;
}

/* from tt-crud.css */
.tt-crud > .tt-crud-search {
  padding: var(--tt-space-3, 0.75rem) var(--tt-space-4, 1rem);
  border-bottom: 1px solid var(--tt-tone-border, #dee2e6);
  background: var(--tt-tone-muted, #f8f9fa);
  margin-bottom: 0 !important;
}
.tt-crud > .tt-crud-pager {
  padding: var(--tt-space-3, 0.75rem) var(--tt-space-4, 1rem);
  border-top: 1px solid var(--tt-tone-border, #dee2e6);
  background: var(--tt-tone-surface, #fff);
  margin-top: 0 !important;
}

/* ============ panelTitle 模式：pager 紧贴表格，无额外分隔 ============ */
.tt-crud.panel .tt-crud-pager {
  padding: 0.75rem 1rem 0.25rem;
  border-top: none;
  background: transparent;
  margin-top: 0.5rem !important;
}

/* from flags.css */
.tt-chrome .app-header-lang > .tt-chrome-btn,
.tt-chrome .app-header-lang > .btn-system {
  line-height: 1 !important;
  height: var(--tt-control-h, 2.25rem) !important;
  width: var(--tt-control-h, 2.25rem) !important;
  padding: 0 !important;
}

/* 顶栏铃铛 / 语言 / 用户菜单的最终皮。
   必须排在各壳 theme.min.css 之后：壳会在 .dropdown-menu 上改自己的变量，先写的共用规则压不住。 */

.tt-chrome {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tt-chrome .tt-chrome-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tt-chrome .tt-chrome-btn,
.tt-chrome .tt-chrome-avatar {
  width: var(--tt-control-h, 2.25rem) !important;
  height: var(--tt-control-h, 2.25rem) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: var(--tt-text, #212529) !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

.tt-chrome .tt-chrome-btn:hover,
.tt-chrome .tt-chrome-btn.is-on {
  background: rgba(127, 127, 127, 0.14) !important;
}

.tt-chrome .tt-chrome-btn svg {
  width: 1.15rem !important;
  height: 1.15rem !important;
}

.tt-chrome .dropdown-menu {
  --bs-dropdown-padding-x: 0;
  --bs-dropdown-padding-y: 0;
  --bs-dropdown-font-size: var(--tt-fs-md, 0.875rem);
  --bs-dropdown-color: var(--tt-text, #212529);
  --bs-dropdown-bg: var(--tt-surface, #fff);
  --bs-dropdown-border-color: var(--tt-border, #dee2e6);
  --bs-dropdown-border-radius: var(--tt-radius-lg, 0.5rem);
  --bs-dropdown-border-width: 1px;
  --bs-dropdown-box-shadow: var(--tt-shadow-pop, 0 0.5rem 1.5rem rgba(16, 24, 40, 0.12));
  --bs-dropdown-link-color: var(--tt-text, #212529);
  --bs-dropdown-link-hover-color: var(--tt-text, #212529);
  --bs-dropdown-link-hover-bg: rgba(127, 127, 127, 0.12);
  --bs-dropdown-link-active-color: var(--tt-primary-emphasis, #334155);
  --bs-dropdown-link-active-bg: var(--tt-primary-subtle, rgba(51, 65, 85, 0.1));
  --bs-dropdown-item-padding-x: 0.9rem;
  --bs-dropdown-item-padding-y: 0.45rem;
  --chathive-dropdown-padding-x: 0;
  --chathive-dropdown-padding-y: 0;
  --chathive-dropdown-font-size: var(--tt-fs-md, 0.875rem);
  --chathive-dropdown-color: var(--tt-text, #212529);
  --chathive-dropdown-bg: var(--tt-surface, #fff);
  --chathive-dropdown-border-color: var(--tt-border, #dee2e6);
  --chathive-dropdown-border-radius: var(--tt-radius-lg, 0.5rem);
  --chathive-dropdown-border-width: 1px;
  --chathive-dropdown-box-shadow: var(--tt-shadow-pop, 0 0.5rem 1.5rem rgba(16, 24, 40, 0.12));
  --chathive-dropdown-link-color: var(--tt-text, #212529);
  --chathive-dropdown-link-hover-color: var(--tt-text, #212529);
  --chathive-dropdown-link-hover-bg: rgba(127, 127, 127, 0.12);
  --chathive-dropdown-link-active-color: var(--tt-primary-emphasis, #334155);
  --chathive-dropdown-link-active-bg: var(--tt-primary-subtle, rgba(51, 65, 85, 0.1));
  --chathive-dropdown-item-padding-x: 0.9rem;
  --chathive-dropdown-item-padding-y: 0.45rem;

  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  margin: 0 !important;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif !important;
  font-size: var(--tt-fs-md, 0.875rem) !important;
  line-height: var(--tt-lh, 1.45) !important;
  color: var(--tt-text, #212529) !important;
  background: var(--tt-surface, #fff) !important;
  background-color: var(--tt-surface, #fff) !important;
  border: 1px solid var(--tt-border, #dee2e6) !important;
  border-radius: var(--tt-radius-lg, 0.5rem) !important;
  box-shadow: var(--tt-shadow-pop, 0 0.5rem 1.5rem rgba(16, 24, 40, 0.12)) !important;
}

.tt-chrome .dropdown-menu::before,
.tt-chrome .dropdown-menu::after {
  content: none !important;
  display: none !important;
}

.tt-chrome .tt-notify-menu,
.tt-chrome .tt-lang-menu,
.tt-chrome .tt-user-menu {
  padding: 0 !important;
}

.tt-chrome .tt-notify-menu {
  min-width: 20rem !important;
  max-width: 24rem !important;
}

.tt-chrome .tt-lang-menu {
  min-width: 14rem !important;
  overflow-x: hidden !important;
}

.tt-chrome .tt-lang-list {
  overflow-x: hidden;
}

/* ChatHive 给 .dropdown-item 加了左右外边距，选中底色会伸出菜单，变成一条横条。 */
.tt-chrome .tt-lang-menu .tt-lang-item {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.tt-chrome .tt-chrome-search-menu {
  padding: 0.65rem !important;
}

.tt-chrome .dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem !important;
  color: var(--tt-text, #212529) !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  font-size: var(--tt-fs-md, 0.875rem) !important;
  font-weight: 400 !important;
  line-height: var(--tt-lh, 1.45) !important;
  white-space: normal !important;
}

.tt-chrome .dropdown-menu .dropdown-item:hover,
.tt-chrome .dropdown-menu .dropdown-item:focus {
  color: var(--tt-text, #212529) !important;
  background: rgba(127, 127, 127, 0.12) !important;
  background-color: rgba(127, 127, 127, 0.12) !important;
}

.tt-chrome .dropdown-menu .tt-notify-item {
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
  padding: 0.55rem 0.9rem !important;
}

.tt-chrome .dropdown-menu .tt-lang-item.active,
.tt-chrome .dropdown-menu .dropdown-item.active {
  color: var(--tt-primary-emphasis, #334155) !important;
  background: var(--tt-primary-subtle, rgba(51, 65, 85, 0.1)) !important;
  background-color: var(--tt-primary-subtle, rgba(51, 65, 85, 0.1)) !important;
}

/* 样板页压厂商壳。插件样式里不能写 !important。 */
.tt-template-root,
.tt-template-root .tt-plugin-frame,
.tt-template-root .tt-plugin-frame > * {
  height: auto !important;
  min-height: 0;
  overflow: visible;
}

html[data-tt-shell='chathive']:has(.tt-template-root) #tt-chathive-aside {
  display: none !important;
}

html[data-tt-shell='chathive']:has(.tt-template-root) .chathive-navigation {
  transform: none !important;
  left: 0 !important;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

html[data-tt-shell='chathive']:has(.tt-template-root) .chathive-content {
  margin-left: var(--chathive-navigation-width, 6rem) !important;
}

html[data-tt-shell='chathive']:has(.tt-template-root) .ch-stage,
html[data-tt-shell='chathive']:has(.tt-template-root) .micro-slot {
  overflow: visible;
  height: auto !important;
  min-height: 0;
}

.tt-official .navbar-sidebar-aside-content,
.tt-official .main-content,
.tt-official .content-wrapper,
.tt-official .chathive-content-body {
  margin-left: 0 !important;
  padding-left: 0 !important;
  width: 100% !important;
  max-width: 100%;
  position: relative !important;
  left: auto !important;
  overflow: visible !important;
}
