/* 工具中心首页 Hero：模块页共用，始终位于一级导航上方。 */
.tool-home-hero {
  display: block;
  overflow: hidden;
  margin-inline: var(--tool-home-hero-offset, 0);
  background: #0b1119;
}

.tool-home-hero img {
  display: block;
  width: 100%;
  height: auto;
  transition: filter 180ms ease;
}

.tool-home-hero:hover img,
.tool-home-hero:focus-visible img { filter: brightness(1.06); }

.tool-home-hero:active img { filter: brightness(.96); }
/* 工具中心一级模块导航：三个模块使用独立页面，二级导航留在各自页面内。 */
.tool-section-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 4px 0 13px;
}

.tool-section-nav.is-hero-edge {
  position: relative;
  z-index: 21;
  margin-top: -23px;
}

.tool-section-tab {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: rgba(247, 241, 228, .045);
  color: rgba(247, 241, 228, .58);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.tool-section-tab:not(.is-active):hover,
.tool-section-tab:not(.is-active):focus-visible {
  background: rgba(247, 241, 228, .08);
  color: rgba(247, 241, 228, .84);
}

.tool-section-tab.is-active {
  background: linear-gradient(180deg, #f6cf59, #cda52e);
  color: #211a0f;
  box-shadow: 0 8px 22px rgba(212, 175, 55, .18), inset 0 1px 0 rgba(255, 255, 255, .5);
}

.tool-section-tab.is-new::after {
  content: "NEW";
  position: absolute;
  top: -6px;
  right: -4px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #d95d52;
  color: #fffaf1;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .06em;
  box-shadow: 0 3px 9px rgba(0, 0, 0, .28);
  pointer-events: none;
}
.tool-section-tab:active {
  transform: translateY(1px);
}

.tool-section-tab:focus-visible {
  outline: 2px solid rgba(242, 202, 80, .92);
  outline-offset: 2px;
}

@media (max-width: 359px) {
  .tool-section-nav { gap: 5px; }
  .tool-section-tab { padding-inline: 4px; font-size: 16px; }
  .tool-section-tab.is-new::after { top: -5px; right: -2px; padding: 2px 4px; font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .tool-section-tab { transition: none; }
}