/* 工具页只负责接入门徒科技首页的原始侧栏和顶部导航。 */
body.tb-tool-page,
body.tb-tool-directory {
  min-width: 320px;
  padding-left: 0 !important;
  overflow-x: hidden;
  background: #f5f6f7 !important;
  color: #282a2d;
}

body.tb-tool-page #tbChrome,
body.tb-tool-directory #tbChrome {
  display: contents;
}

body.tb-tool-page > .main-content,
body.tb-tool-directory > .main-content,
body.tb-tool-directory main {
  margin-left: 240px !important;
  padding-top: 74px !important;
  background-color: #f5f6f7 !important;
}

body.tb-tool-page > .main-content,
body.tb-tool-directory > .main-content {
  min-height: 100vh;
}

/* 详情页工作区随共享主题切换，避免工具内部主题与外壳背景脱节。 */
html[data-theme='light'] body.tb-tool-page,
html[data-theme='light'] body.tb-tool-page > .main-content {
  background-color: #f5f6f7 !important;
  color: #282a2d;
}

html[data-theme='dark'] body.tb-tool-page,
html[data-theme='dark'] body.tb-tool-page > .main-content {
  background-color: #11161b !important;
  color: #e8edf2;
}

/* 工具首页的内容区、外侧空白和底部保持同一主题背景，避免滚动到底部出现断层。 */
html.tb-tool-directory,
html.tb-tool-directory body.tb-tool-directory,
html.tb-tool-directory body.tb-tool-directory .site-shell,
html[data-theme='light'] body.tb-tool-directory,
html[data-theme='light'] body.tb-tool-directory main,
html[data-theme='light'] body.tb-tool-directory .site-footer {
  background-color: #f5f6f7 !important;
  color: #282a2d;
}

html[data-theme='dark'] body.tb-tool-directory,
html[data-theme='dark'] body.tb-tool-directory main,
html[data-theme='dark'] body.tb-tool-directory .site-shell,
html[data-theme='dark'] body.tb-tool-directory .site-footer,
html[data-theme='dark'] body.tb-tool-directory main {
  background-color: #11161b !important;
  color: #e8edf2;
}

/* 首页夜间模式的连续深色工作区：页面、内容区和页脚使用同一背景。 */
html[data-theme='dark'] body.tb-tool-page,
html[data-theme='dark'] body.tb-tool-page > .main-content,
html[data-theme='dark'] body.tb-tool-directory,
html[data-theme='dark'] body.tb-tool-directory > .main-content,
html[data-theme='dark'] body.tb-tool-directory main {
  background-color: #11161b !important;
  color: #e8edf2;
}

html[data-theme='dark'].tb-tool-page,
html[data-theme='dark'].tb-tool-directory {
  background-color: #11161b !important;
  color: #e8edf2;
}

/* 工具页共享侧栏覆盖首页灰色模式，保持夜间模式下的深色菜单。 */
html[data-theme='dark'] body.tb-tool-page #sidebar,
html[data-theme='dark'] body.tb-tool-directory #sidebar,
html[data-theme='dark'] body.tb-tool-page #sidebar .sidebar-nav-inner,
html[data-theme='dark'] body.tb-tool-directory #sidebar .sidebar-nav-inner,
html[data-theme='dark'] body.tb-tool-page #sidebar .sidebar-logo,
html[data-theme='dark'] body.tb-tool-directory #sidebar .sidebar-logo {
  background: #2c2e2f !important;
  color: #f2f4f3;
}

html[data-theme='dark'] body.tb-tool-page #sidebar .border-color,
html[data-theme='dark'] body.tb-tool-directory #sidebar .border-color {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme='dark'] body.tb-tool-page #sidebar .sidebar-menu-inner a,
html[data-theme='dark'] body.tb-tool-directory #sidebar .sidebar-menu-inner a,
html[data-theme='dark'] body.tb-tool-page #sidebar .flex-bottom a,
html[data-theme='dark'] body.tb-tool-directory #sidebar .flex-bottom a {
  color: #f2f4f3 !important;
}

html[data-theme='dark'] body.tb-tool-page #sidebar .sidebar-menu-inner a:hover,
html[data-theme='dark'] body.tb-tool-directory #sidebar .sidebar-menu-inner a:hover,
html[data-theme='dark'] body.tb-tool-page #sidebar .flex-bottom a:hover,
html[data-theme='dark'] body.tb-tool-directory #sidebar .flex-bottom a:hover,
html[data-theme='dark'] body.tb-tool-page #sidebar .sidebar-show > a,
html[data-theme='dark'] body.tb-tool-directory #sidebar .sidebar-show > a {
  background: #383c3e !important;
  color: #f2f4f3 !important;
}

html[data-theme='dark'] body.tb-tool-page #sidebar .logo-light,
html[data-theme='dark'] body.tb-tool-directory #sidebar .logo-light {
  display: none !important;
}

html[data-theme='dark'] body.tb-tool-page #sidebar .logo-dark,
html[data-theme='dark'] body.tb-tool-directory #sidebar .logo-dark {
  display: inline-block !important;
}

body.tb-tool-page > nav.nav-bar,
body.tb-tool-directory > nav.nav-bar,
body.tb-tool-page nav.nav-bar,
body.tb-tool-directory nav.nav-bar {
  display: none !important;
}

body.tb-tool-directory .site-header {
  display: none !important;
}

/* 详情页保留共享外壳的右下角主题按钮，隐藏原页面右上角重复按钮。 */
body.tb-tool-page .theme-toggle {
  display: none !important;
}

/* AGI 风格详情页移除标题大图标后，标题直接从标题区顶部开始。 */
body.tb-tool-page .tb-hero-logo-removed > h1 {
  margin-top: 0 !important;
}

/* 工具页顶部导航是固定定位，主内容已预留 74px；避免导航占位元素落到页脚之后。 */
body.tb-tool-page #tbHomeHeader .placeholder,
body.tb-tool-directory #tbHomeHeader .placeholder {
  display: none !important;
}

/* 工具详情页沿用首页资源面包屑的单行、无卡片结构。 */
body.tb-tool-page .tb-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-start !important;
  gap: 0;
  width: 100%;
  height: 30px;
  min-height: 30px;
  margin: 11px 0 24px;
  padding: 0;
  overflow-x: auto;
  color: #fff;
  font-size: 16px;
  line-height: 30px;
  scrollbar-width: none;
  white-space: nowrap;
}

body.tb-tool-page .tb-breadcrumb::-webkit-scrollbar {
  display: none;
}

body.tb-tool-page .tb-breadcrumb-link,
body.tb-tool-page .tb-breadcrumb-current {
  flex: 0 0 auto;
  height: 30px;
  line-height: 30px;
  white-space: nowrap;
}

body.tb-tool-page .tb-breadcrumb-link {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  cursor: pointer;
  color: #fff;
  text-decoration: none;
}

body.tb-tool-page .tb-breadcrumb-link:hover,
body.tb-tool-page .tb-breadcrumb-link:focus-visible {
  color: #fff;
  text-decoration: none;
}

body.tb-tool-page .tb-breadcrumb-current {
  color: #fff;
  font-weight: 700;
}

body.tb-tool-page .tb-breadcrumb-separator {
  display: inline-flex;
  flex: 0 0 15px;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 30px;
  color: #fff;
  line-height: 1;
}

html[data-theme='light'] body.tb-tool-page .tb-breadcrumb,
html[data-theme='light'] body.tb-tool-page .tb-breadcrumb-link,
html[data-theme='light'] body.tb-tool-page .tb-breadcrumb-link:hover,
html[data-theme='light'] body.tb-tool-page .tb-breadcrumb-link:focus-visible,
html[data-theme='light'] body.tb-tool-page .tb-breadcrumb-current,
html[data-theme='light'] body.tb-tool-page .tb-breadcrumb-separator {
  color: #202124;
}

/* 所有详情页统一使用固定面包屑层，不受原页面容器结构影响。 */
body.tb-tool-page > .tb-breadcrumb {
  position: absolute;
  top: 85px;
  left: calc(240px + 1rem);
  width: calc(100% - 240px - 1rem);
  margin: 0;
  padding: 0;
  z-index: 1079;
  pointer-events: auto;
}

@media (min-width: 768px) {
  /* 面包屑与顶部折叠菜单保持同样的左菜单间距。 */
  body.tb-tool-page.tb-mini-sidebar > .tb-breadcrumb {
    left: calc(60px + 1rem);
    width: calc(100% - 60px - 1rem);
  }
}

/* 面包屑顶部 85px、高度 30px，正文标题从底部下方 15px 开始。 */
body.tb-tool-page > .main-content.tb-detail-content-root,
body.tb-tool-page > .tb-detail-content-root,
body.tb-tool-page .tb-detail-content-root {
  padding-top: 130px !important;
}

@media (max-width: 767.98px) {
  body.tb-tool-page > .tb-breadcrumb {
    left: 10px;
    width: calc(100% - 10px);
    padding: 0;
  }
}

.tb-footer-tools {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1085;
  display: flex;
  flex-direction: column;
}

.tb-footer-tools .btn {
  display: block;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eee;
  color: #777;
  cursor: pointer;
  font-size: 1rem;
  line-height: 40px;
  text-align: center;
  text-decoration: none;
}

.tb-footer-tools .btn:hover,
.tb-footer-tools .btn:focus-visible {
  background: #eee;
  color: #444;
}

.tb-footer-tools .btn[hidden] {
  display: none;
}

.tb-footer-tools .btn i {
  display: inline-block;
  line-height: 1;
}

.tb-footer-tools.reader-tools-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(74px);
}

/* 工具首页底部广告参考首页固定弹出广告，广告出现时快捷按钮同步上移。 */
.tool-bottom-ad {
  position: fixed;
  right: 0;
  bottom: -70px;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 70px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: bottom 0.4s ease;
}

.tool-bottom-ad.is-visible {
  bottom: 0;
}

.tool-bottom-ad[hidden] {
  display: none;
}

.tool-bottom-ad .adsbygoogle {
  display: inline-block;
  width: 100%;
  height: 60px;
}

.tool-bottom-ad-close {
  position: absolute;
  top: 5px;
  right: 10px;
  z-index: 10001;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #666;
  cursor: pointer;
  font-size: 16px;
  line-height: 24px;
}

.tool-bottom-ad-close:hover,
.tool-bottom-ad-close:focus-visible {
  color: #202124;
}

body.tb-tool-directory.tb-bottom-ad-visible {
  padding-bottom: 80px;
}

body.tb-tool-directory.tb-bottom-ad-visible .tb-footer-tools {
  bottom: 90px;
}

@media (max-width: 767.98px) {
  .tb-footer-tools {
    right: 10px;
    bottom: 15px;
    transition: transform 0.22s ease, opacity 0.22s ease;
    will-change: transform, opacity;
  }

  body.tb-tool-directory.tb-bottom-ad-visible .tb-footer-tools {
    bottom: 85px;
  }
}

#tbHomeHeader {
  display: block;
  --tb-nav-label-size: 14px;
  --tb-nav-desktop-icon-size: 1.33333em;
  --tb-nav-logo-size: 40px;
  --tb-nav-short-icon-size: 22px;
  --tb-nav-search-icon-size: 24px;
}

#tbHomeHeader .page-header {
  z-index: 1080;
  color: #fff;
  background: rgba(255, 255, 255, 0);
  box-shadow: none;
  transition: color 0.3s, background-color 0.3s;
}

#tbHomeHeader.header-bg .page-header {
  color: initial;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.7);
}

#tbHomeHeader:not(.header-bg) .page-header .navbar-nav > li > a,
#tbHomeHeader:not(.header-bg) .navbar-menu a:not(.dropdown-item) {
  color: #fff;
}

#tbHomeHeader .mobile-brand-plan .top-plan-short-link {
  color: inherit;
}

#tbHomeHeader .mobile-brand-plan .top-plan-short-link:hover {
  color: #dc3545;
}

#tbHomeHeader:not(.header-bg) .header-mini-btn path {
  stroke: #fff;
}

#tbHomeHeader:not(.header-bg) .page-header .navbar-nav > li > a:hover,
#tbHomeHeader:not(.header-bg) .navbar-menu a:not(.dropdown-item):hover {
  color: #dc3545;
}

#tbHomeHeader:not(.header-bg) .header-mini-btn label:hover path {
  stroke: #fff;
}

body.io-black-mode #tbHomeHeader .page-header {
  background: transparent;
  box-shadow: none;
}

body.io-black-mode #tbHomeHeader.header-bg .page-header {
  color: #fff;
  background: #2c2e2f;
  box-shadow: 0 0 25px 5px rgba(10, 10, 10, 0.25);
}

/* 详情页导航使用随主题变化的半透明底，确保文字在不同工具背景上都清晰。 */
body.tb-tool-page #tbHomeHeader .page-header,
body.tb-tool-page #tbHomeHeader.header-bg .page-header {
  color: #fff;
  background: rgba(55, 65, 81, 0.78) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.14);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

body.tb-tool-page #tbHomeHeader .page-header .navbar-nav > li > a,
body.tb-tool-page #tbHomeHeader .navbar-menu a:not(.dropdown-item),
body.tb-tool-page #tbHomeHeader .header-mini-btn path {
  color: #fff;
  stroke: #fff;
}

body.tb-tool-page #tbHomeHeader .page-header .navbar-nav > li > a:hover,
body.tb-tool-page #tbHomeHeader .navbar-menu a:not(.dropdown-item):hover {
  color: #ffd166;
}

html[data-theme='light'] body.tb-tool-page #tbHomeHeader .page-header,
html[data-theme='light'] body.tb-tool-page #tbHomeHeader.header-bg .page-header {
  color: #202124;
  background: rgba(255, 255, 255, 0.84) !important;
  border-bottom-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
}

html[data-theme='light'] body.tb-tool-page #tbHomeHeader .page-header .navbar-nav > li > a,
html[data-theme='light'] body.tb-tool-page #tbHomeHeader .navbar-menu a:not(.dropdown-item),
html[data-theme='light'] body.tb-tool-page #tbHomeHeader .header-mini-btn path {
  color: #202124;
  stroke: #202124;
}

html[data-theme='light'] body.tb-tool-page #tbHomeHeader .page-header .navbar-nav > li > a:hover,
html[data-theme='light'] body.tb-tool-page #tbHomeHeader .navbar-menu a:not(.dropdown-item):hover {
  color: #dc3545;
}

body.io-black-mode.tb-tool-page #tbHomeHeader .page-header,
body.io-black-mode.tb-tool-page #tbHomeHeader.header-bg .page-header {
  background: rgba(25, 30, 36, 0.9) !important;
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}

html[data-theme='light'] body.tb-tool-page .tb-footer-tools .btn {
  background: rgba(255, 255, 255, 0.92);
  color: #4b5563;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

html[data-theme='dark'] body.tb-tool-page .tb-footer-tools .btn {
  background: rgba(31, 41, 55, 0.92);
  color: #e5e7eb;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

html[data-theme='light'] body.tb-tool-page .tb-footer-tools .btn:hover,
html[data-theme='light'] body.tb-tool-page .tb-footer-tools .btn:focus-visible {
  background: #fff;
  color: #202124;
}

html[data-theme='dark'] body.tb-tool-page .tb-footer-tools .btn:hover,
html[data-theme='dark'] body.tb-tool-page .tb-footer-tools .btn:focus-visible {
  background: #374151;
  color: #fff;
}

@media (min-width: 768px) {
  #tbHomeHeader .page-header {
    height: 74px;
    min-height: 74px;
  }
}

#tbHomeHeader .navbar-menu {
  display: flex;
}

@media (min-width: 768px) {
  /* 工具页顶部主导航与首页保持一致的图标文字间距。 */
  #tbHomeHeader .page-header .site-menu > li > a > i {
    margin-right: 8px !important;
  }
}

#tbHomeHeader .page-header .navbar-nav > li > a {
  font-size: var(--tb-nav-label-size);
}

#tbHomeHeader .page-header .site-menu > li > a > i {
  font-size: var(--tb-nav-desktop-icon-size) !important;
}

/* 手机端快捷入口沿用首页的固定尺寸和间距，避免图标按行内文字收缩。 */
#tbHomeHeader .navbar-menu .nav-search,
#tbHomeHeader .navbar-menu .nav-account,
#tbHomeHeader .navbar-menu .mobile-menu {
  display: inline-flex;
  height: 32px;
  align-items: center;
}

#tbHomeHeader .navbar-menu .nav-account {
  margin-left: 12px;
}

/* 工具页手机端与平板竖屏使用移动版顶部导航和抽屉侧栏。 */
@media (max-width: 767.98px), (min-width: 768px) and (max-width: 1366px) and (orientation: portrait) {
  #sidebar {
    display: none !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    position: fixed;
    z-index: 1090 !important;
    padding-left: 0 !important;
    background: transparent !important;
  }

  #sidebar.show {
    display: block !important;
  }

  #sidebar > div {
    position: fixed;
    width: 17.5rem !important;
    max-width: 17.5rem !important;
    height: 100%;
    transform: translate3d(-100%, 0, 0);
    transition: 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  }

  #sidebar.show > div {
    transform: translate3d(0, 0, 0);
  }

  body.tb-tool-page > .main-content,
  body.tb-tool-directory > .main-content,
  body.tb-tool-directory main {
    margin-left: 0 !important;
    padding-top: 74px !important;
  }

  body.tb-tool-directory .site-footer {
    margin-left: 0 !important;
  }

  #tbHomeHeader .page-header {
    left: 0 !important;
  }

  #tbHomeHeader .mobile-brand-plan {
    display: inline-flex !important;
  }

  #tbHomeHeader .navbar-collapse {
    display: none !important;
  }

  #tbHomeHeader .navbar-menu .mobile-menu,
  #tbHomeHeader .navbar-menu #sidebar-switch {
    display: inline-flex !important;
  }

  /* 白天模式的移动 Logo 随顶部导航背景切换黑白版本。 */
  html[data-theme='light'] body.tb-tool-page #tbHomeHeader:not(.header-bg) .mobile-brand-plan .logo-light,
  html[data-theme='light'] body.tb-tool-directory #tbHomeHeader:not(.header-bg) .mobile-brand-plan .logo-light {
    display: none !important;
  }

  html[data-theme='light'] body.tb-tool-page #tbHomeHeader:not(.header-bg) .mobile-brand-plan .logo-dark,
  html[data-theme='light'] body.tb-tool-directory #tbHomeHeader:not(.header-bg) .mobile-brand-plan .logo-dark {
    display: inline-block !important;
  }

  html[data-theme='light'] body.tb-tool-page #tbHomeHeader.header-bg .mobile-brand-plan .logo-light,
  html[data-theme='light'] body.tb-tool-directory #tbHomeHeader.header-bg .mobile-brand-plan .logo-light {
    display: inline-block !important;
  }

  html[data-theme='light'] body.tb-tool-page #tbHomeHeader.header-bg .mobile-brand-plan .logo-dark,
  html[data-theme='light'] body.tb-tool-directory #tbHomeHeader.header-bg .mobile-brand-plan .logo-dark {
    display: none !important;
  }
}

#tbHomeHeader .top-plan-short-link,
#tbHomeHeader .navbar-menu .nav-search > a,
#tbHomeHeader .navbar-menu .nav-account > a,
#tbHomeHeader .navbar-menu .mobile-menu > a {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  color: inherit;
  line-height: 1;
}

#tbHomeHeader .top-plan-short-link i,
#tbHomeHeader .navbar-menu .nav-search i,
#tbHomeHeader .navbar-menu .mobile-menu i {
  display: inline-flex;
  width: 1em;
  height: 1em;
  align-items: center;
  justify-content: center;
  font-size: var(--tb-nav-search-icon-size);
  line-height: 1;
}

#tbHomeHeader .navbar-menu .nav-account-icon {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

#tbHomeHeader:not(.header-bg) .navbar-menu .nav-account-icon,
body.io-black-mode #tbHomeHeader .navbar-menu .nav-account-icon {
  filter: invert(1);
}

body.tb-tool-page:not(.io-black-mode) #tbHomeHeader .navbar-menu .nav-account-icon {
  filter: none;
}

#tbHomeHeader .top-plan-short-link i {
  width: var(--tb-nav-short-icon-size);
  height: var(--tb-nav-short-icon-size);
  font-size: var(--tb-nav-short-icon-size);
}

#tbHomeHeader .mobile-brand-plan {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
}

#tbHomeHeader .mobile-brand-plan .navbar-brand {
  margin-right: 0;
}

#tbHomeHeader .mobile-brand-plan .navbar-brand img {
  max-height: var(--tb-nav-logo-size);
}

#tbHomeHeader .top-plan-short-after-logo {
  flex: 0 0 32px;
  margin-left: 5px;
}

@media (max-width: 767.98px) {
  #tbHomeHeader .navbar-menu .nav-search {
    transform: translateX(6px);
  }

  #tbHomeHeader .navbar-menu .nav-account {
    margin-left: 14px;
  }
}

@media (orientation: portrait) and (min-width: 768px) and (max-width: 1100px) {
  #tbHomeHeader .navbar-menu .nav-search i,
  #tbHomeHeader .navbar-menu .mobile-menu i {
    font-size: 26px;
  }

  #tbHomeHeader .navbar-menu .nav-account-icon {
    width: 26px;
    height: 26px;
  }
}

/* iPad mini 竖屏沿用手机顶部导航基准；更大的平板逐级增加 1px、2px。 */
@media (min-width: 800px) and (max-width: 1023px) and (orientation: portrait) {
  #tbHomeHeader {
    --tb-nav-label-size: 15px;
    --tb-nav-desktop-icon-size: calc(1.33333em + 1px);
    --tb-nav-logo-size: 41px;
    --tb-nav-short-icon-size: 23px;
    --tb-nav-search-icon-size: 25px;
  }
}

@media (min-width: 1024px) and (max-width: 1366px) and (orientation: portrait) {
  #tbHomeHeader {
    --tb-nav-label-size: 16px;
    --tb-nav-desktop-icon-size: calc(1.33333em + 2px);
    --tb-nav-logo-size: 42px;
    --tb-nav-short-icon-size: 24px;
    --tb-nav-search-icon-size: 26px;
  }
}

/* 工具首页复用根首页的分类面板结构，仅补充工具页的定位。 */
.tb-tools-panel {
  --plan-cell-size: clamp(34px, 4.2vw, 56px);
  --plan-grid-gap: 8px;
  position: fixed;
  top: 86px;
  left: 260px;
  z-index: 1079;
  display: flex;
  width: 350px;
  max-width: calc(100vw - 284px);
  max-height: min(72vh, 620px);
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(222, 222, 222, 0.92);
  border-radius: 10px;
  background: #f1f3f5;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
  color: #202124;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tb-tools-panel[hidden] {
  display: none;
}

.tb-tools-panel .reading-plan-header {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tb-tools-panel .reading-plan-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.tb-tools-panel .reading-plan-close {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #202124;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.tb-tools-panel .reading-plan-content {
  display: block;
}

.tb-tools-panel .equip-panel-modules {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(6, 54px);
  grid-auto-flow: row;
  gap: 8px;
}

.tb-tools-panel .reading-plan-month {
  display: flex;
  width: 100%;
  height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: #fff;
  color: #202124;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.tb-tools-panel .reading-plan-month:hover,
.tb-tools-panel .reading-plan-month:focus-visible,
.tb-tools-panel .reading-plan-month.active {
  border-color: #2f5f8f;
  background: #2f5f8f;
  color: #fff;
}

.tb-tools-panel .equip-module-label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.tb-tools-panel .equip-module-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  color: inherit;
  font-size: 18px;
  line-height: 1;
}

.tb-tools-panel .tb-tools-category {
  box-sizing: border-box;
}

/* 工具分类按钮沿用首页装备面板：分类色、图标和右侧数量徽标。 */
.tb-tools-panel .reading-plan-month[data-tool-category='intelligence'] { border-color: #7e57c2; color: #7e57c2; }
.tb-tools-panel .reading-plan-month[data-tool-category='creation'] { border-color: #d64545; color: #d64545; }
.tb-tools-panel .reading-plan-month[data-tool-category='material'] { border-color: #0097a7; color: #008795; }
.tb-tools-panel .reading-plan-month[data-tool-category='office'] { border-color: #2874a6; color: #2874a6; }
.tb-tools-panel .reading-plan-month[data-tool-category='life'] { border-color: #2e8b57; color: #2e8b57; }
.tb-tools-panel .reading-plan-month[data-tool-category='development'] { border-color: #e67e22; color: #d66a08; }

.tb-tools-panel .equip-category-count {
  display: inline-flex;
  min-width: 28px;
  height: 26px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid currentColor;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
}

body.io-black-mode .tb-tools-panel .reading-plan-month[data-tool-category='intelligence'] { border-color: #a98bdd; color: #a98bdd; }
body.io-black-mode .tb-tools-panel .reading-plan-month[data-tool-category='creation'] { border-color: #ef7771; color: #ef7771; }
body.io-black-mode .tb-tools-panel .reading-plan-month[data-tool-category='material'] { border-color: #50bac5; color: #50bac5; }
body.io-black-mode .tb-tools-panel .reading-plan-month[data-tool-category='office'] { border-color: #66a4d8; color: #66a4d8; }
body.io-black-mode .tb-tools-panel .reading-plan-month[data-tool-category='life'] { border-color: #57b880; color: #57b880; }
body.io-black-mode .tb-tools-panel .reading-plan-month[data-tool-category='development'] { border-color: #f0a25d; color: #f0a25d; }

body.io-black-mode .tb-tools-panel .equip-category-count {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.22), 0 1px 3px rgba(0, 0, 0, 0.24);
}

body.io-black-mode .tb-tools-panel .reading-plan-month[data-tool-category='intelligence'] .equip-category-count { background: #62458f; }
body.io-black-mode .tb-tools-panel .reading-plan-month[data-tool-category='creation'] .equip-category-count { background: #a83f3f; }
body.io-black-mode .tb-tools-panel .reading-plan-month[data-tool-category='material'] .equip-category-count { background: #177b85; }
body.io-black-mode .tb-tools-panel .reading-plan-month[data-tool-category='office'] .equip-category-count { background: #35698f; }
body.io-black-mode .tb-tools-panel .reading-plan-month[data-tool-category='life'] .equip-category-count { background: #347a59; }
body.io-black-mode .tb-tools-panel .reading-plan-month[data-tool-category='development'] .equip-category-count { background: #a95c19; }

.tb-tools-panel .reading-plan-month:hover,
.tb-tools-panel .reading-plan-month:focus-visible,
.tb-tools-panel .reading-plan-month.active {
  border-color: #2f5f8f;
  background: #2f5f8f;
  color: #fff;
}

.tb-tools-panel .reading-plan-month:hover .equip-category-count,
.tb-tools-panel .reading-plan-month:focus-visible .equip-category-count,
.tb-tools-panel .reading-plan-month.active .equip-category-count {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
}

.tb-tools-panel .tb-tools-panel-ad {
  width: 100%;
  height: 50px;
  overflow: hidden;
  color: #8a9096;
  font-size: 11px;
  line-height: 1;
  text-align: center;
}

.tb-tools-panel .tb-tools-panel-ad .adsbygoogle {
  display: inline-block;
  width: 100%;
  height: 50px;
}

body.io-black-mode .tb-tools-panel .tb-tools-panel-ad {
  color: #a7b0ba;
}

body.io-black-mode .tb-tools-panel {
  border-color: #4b5563;
  background: #1f2327;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  color: #fff;
}

body.io-black-mode .tb-tools-panel .reading-plan-month {
  border-color: #4b5563;
  background: #2b3035;
  color: #f1f3f4;
}

body.io-black-mode .tb-tools-panel .reading-plan-close {
  color: #f1f3f4;
}

@media (max-width: 767.98px) {
  #sidebar.show {
    display: block !important;
  }

  #sidebar.show > div {
    transform: translate3d(0, 0, 0);
  }

  body.tb-tool-page > .main-content,
  body.tb-tool-directory > .main-content,
  body.tb-tool-directory main {
    margin-left: 0 !important;
    padding-top: 74px !important;
  }

  #tbHomeHeader .navbar-menu {
    display: flex;
  }

  .tb-tools-panel {
    top: 76px;
    left: 12px;
    width: calc(100vw - 24px);
    max-width: none;
    max-height: min(68vh, 520px);
  }

  .tb-tools-panel .equip-panel-modules {
    max-height: none;
    overflow: visible;
  }
}

@media (min-width: 768px) {
  body.tb-tool-page.tb-mini-sidebar > .main-content,
  body.tb-tool-directory.tb-mini-sidebar main {
    margin-left: 60px !important;
  }

  body.tb-tool-directory .site-footer {
    margin-left: 240px;
    transition: margin-left .2s;
  }

  body.tb-tool-directory.tb-mini-sidebar .site-footer {
    margin-left: 60px;
  }

  body.tb-tool-page.tb-mini-sidebar #tbHomeHeader .page-header,
  body.tb-tool-directory.tb-mini-sidebar #tbHomeHeader .page-header {
    left: 60px;
  }

  body.tb-tool-page #sidebar.mini-sidebar,
  body.tb-tool-directory #sidebar.mini-sidebar {
    width: 60px !important;
  }

  body.tb-tool-page #sidebar.mini-sidebar .sidebar-nav-inner,
  body.tb-tool-directory #sidebar.mini-sidebar .sidebar-nav-inner {
    width: 60px;
    max-width: 60px;
  }

  body.tb-tool-page.tb-mini-sidebar .tb-tools-panel,
  body.tb-tool-directory.tb-mini-sidebar .tb-tools-panel {
    left: 80px;
    max-width: calc(100vw - 104px);
  }
}

/* 工具页顶部导航与首页黑色模式保持相同的未滚动/滚动后状态。 */
html[data-theme='dark'] body.tb-tool-page #tbHomeHeader .page-header,
html[data-theme='dark'] body.tb-tool-directory #tbHomeHeader .page-header {
  color: #ffffff;
  background: transparent !important;
  border-bottom: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html[data-theme='dark'] body.tb-tool-page #tbHomeHeader.header-bg .page-header,
html[data-theme='dark'] body.tb-tool-directory #tbHomeHeader.header-bg .page-header {
  color: #ffffff;
  background: #2c2e2f !important;
  border-bottom: 0;
  box-shadow: 0 0 25px 5px rgba(10, 10, 10, 0.25);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

html[data-theme='dark'] body.tb-tool-page #tbHomeHeader .page-header .navbar-nav > li > a,
html[data-theme='dark'] body.tb-tool-directory #tbHomeHeader .page-header .navbar-nav > li > a,
html[data-theme='dark'] body.tb-tool-page #tbHomeHeader .navbar-menu a:not(.dropdown-item),
html[data-theme='dark'] body.tb-tool-directory #tbHomeHeader .navbar-menu a:not(.dropdown-item),
html[data-theme='dark'] body.tb-tool-page #tbHomeHeader .header-mini-btn path,
html[data-theme='dark'] body.tb-tool-directory #tbHomeHeader .header-mini-btn path {
  color: #f2f4f3;
  stroke: #ffffff;
}

html[data-theme='dark'] body.tb-tool-page #tbHomeHeader .page-header .navbar-nav > li > a:hover,
html[data-theme='dark'] body.tb-tool-directory #tbHomeHeader .page-header .navbar-nav > li > a:hover,
html[data-theme='dark'] body.tb-tool-page #tbHomeHeader .navbar-menu a:not(.dropdown-item):hover,
html[data-theme='dark'] body.tb-tool-directory #tbHomeHeader .navbar-menu a:not(.dropdown-item):hover {
  color: #f1404b;
}

html[data-theme='dark'] body.tb-tool-page .tb-footer-tools .btn,
html[data-theme='dark'] body.tb-tool-directory .tb-footer-tools .btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(44, 46, 47, 0.88);
  color: #f2f4f3;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

html[data-theme='dark'] body.tb-tool-page .tb-footer-tools .btn:hover,
html[data-theme='dark'] body.tb-tool-page .tb-footer-tools .btn:focus-visible,
html[data-theme='dark'] body.tb-tool-directory .tb-footer-tools .btn:hover,
html[data-theme='dark'] body.tb-tool-directory .tb-footer-tools .btn:focus-visible {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(44, 46, 47, 0.96);
  color: #f1404b;
}

@media (max-width: 767.98px) {
  html[data-theme='dark'] body.tb-tool-page #sidebar,
  html[data-theme='dark'] body.tb-tool-directory #sidebar {
    background: rgba(10, 15, 18, 0.62) !important;
  }

  html[data-theme='dark'] body.tb-tool-page #sidebar > div,
  html[data-theme='dark'] body.tb-tool-directory #sidebar > div {
    background: #2c2e2f !important;
  }
}

@media print {
  #sidebar,
  #tbHomeHeader,
  nav.nav-bar {
    display: none !important;
  }

  body.tb-tool-page,
  body.tb-tool-directory {
    padding-left: 0 !important;
  }
}
