/* 模块说明：公开工具共用字体、色彩、基础元素和背景；从旧首页保留工具实际依赖的部分。 */

/* ── Design Tokens ────────────────────────── */

:root {
  /* Typography */
  --font-display: "Noto Serif SC", "STSong", "Songti SC", "SimSun", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  --weight-hairline: 300;
  --weight-book: 400;
  --weight-bold: 700;
  --weight-black: 900;

  /* Color — Amber Desk at Night */
  --bg-deep: #08080c;
  --bg-elevated: #111118;
  --bg-card: rgba(255, 255, 255, 0.035);
  --bg-card-hover: rgba(255, 255, 255, 0.065);
  --accent-amber: #e8b44b;
  --accent-amber-dim: rgba(232, 180, 75, 0.12);
  --accent-teal: #4db8b0;
  --accent-teal-dim: rgba(77, 184, 176, 0.1);
  --accent-coral: #d47a6b;
  --accent-coral-dim: rgba(212, 122, 107, 0.1);
  --text-primary: #eae6e0;
  --text-muted: #8a8780;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-glow: rgba(232, 180, 75, 0.2);

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 0.4s;
  --dur-base: 0.7s;
  --dur-slow: 1s;

  /* Radii */
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-full: 9999px;
}

/* ── Reset & Base ─────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  font-family: var(--font-body);
  font-weight: var(--weight-hairline);
  color: var(--text-primary);
  background: var(--bg-deep);
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
}
button {
  font: inherit;
  cursor: pointer;
}

/* ── Background Layers ────────────────────── */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 700px 500px at 75% 10%,
      rgba(232, 180, 75, 0.1) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 400px 600px at 20% 80%,
      rgba(77, 184, 176, 0.05) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 300px 300px at 85% 60%,
      rgba(212, 122, 107, 0.04) 0%,
      transparent 70%
    );
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04;
}


/* 键盘焦点可见；工具页原生选项由按钮承接，隐藏 select 不进入 Tab 顺序。 */
:focus-visible { outline: 2px solid var(--accent-amber); outline-offset: 3px; }
html[lang="en"] .tool-page-nav a { white-space: normal; }
.token-estimator-combo-menu[hidden] { display: none !important; }
