:root {
  color-scheme: light;
  --bg: #f8fbff;
  --panel: #ffffff;
  --card: #ffffff;
  --text: #14213a;
  --muted: #66758f;
  --line: rgba(63, 127, 223, 0.16);
  --line2: rgba(63, 127, 223, 0.23);
  --line-strong: rgba(63, 127, 223, 0.32);
  --soft: #f3f7ff;
  --soft2: #eaf1ff;
  --blue: #3f7fdf;
  --blueWeak: #edf4ff;
  --accent: #5f5fc4;
}

html {
  min-width: 280px;
  background: var(--bg);
}

body.tool-page {
  min-width: 280px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(63, 127, 223, 0.11), transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(112, 89, 202, 0.08), transparent 24%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 26px;
}

body.tool-page > .page {
  width: min(1500px, 100%);
}

body.tool-page .topbar {
  margin-bottom: 20px;
}

body.tool-page > .page .card,
body.tool-page > .page .panel,
body.tool-page > .page .result {
  box-shadow: 0 10px 30px rgba(32, 36, 34, 0.045);
}

body.tool-page button,
body.tool-page input,
body.tool-page select {
  -webkit-tap-highlight-color: transparent;
}

body.tool-page button:focus-visible,
body.tool-page input:focus-visible,
body.tool-page select:focus-visible,
body.tool-page a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.site-footer {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(22px, 4.8vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--bg);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.site-footer a {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration-color: transparent;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--text);
  text-decoration-color: currentColor;
  text-underline-offset: 4px;
}

@media (max-width: 680px) {
  body.tool-page > .page {
    padding: 20px 14px 36px;
  }

  .site-footer {
    min-height: 44px;
    display: block;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
    font-size: 0;
  }

  .site-footer > span {
    display: none;
  }

  .site-footer nav {
    display: grid;
    grid-template-columns: max-content max-content;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
  }

  .site-footer a {
    font-size: clamp(6.5px, 2vw, 9px);
    letter-spacing: 0.02em;
    line-height: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
