:root {
  --tool-nav-height: calc(0.65rem * 2 + 1rem + 1px);
}

.tool-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.65rem 1.25rem;
  background: var(--tool-nav-bg, rgba(12, 12, 18, 0.92));
  border-bottom: 1px solid var(--tool-nav-border, rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tool-nav__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--tool-nav-muted, #94a3b8);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.tool-nav__back:hover {
  color: var(--tool-nav-accent, #818cf8);
}

.tool-nav__back svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.tool-nav__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tool-nav-text, #e2e8f0);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 480px) {
  :root {
    --tool-nav-height: calc(0.6rem * 2 + 1rem + 1px);
  }

  .tool-nav {
    padding: 0.6rem 1rem;
  }

  .tool-nav__title {
    font-size: 0.8rem;
    max-width: 45vw;
  }
}
