/* ==========================================================================
   基础样式：重置 + 全局排版 + 通用布局容器
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--gradient-page);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

a {
  color: var(--color-primary-hover);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

:focus-visible {
  outline: 2px solid var(--color-primary-hover);
  outline-offset: 2px;
}

::selection {
  background: var(--color-primary);
  color: #fff;
}

/* 滚动条（Chromium / WebKit） */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.26);
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- 通用布局 ---------- */
.page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 20px;
}

.app-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(11, 16, 32, 0.72);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.brand__logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--gradient-brand);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
}

.brand__sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-dim);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-dim {
  color: var(--color-text-dim);
}

.text-center {
  text-align: center;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 2px;
}

.is-hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .container {
    padding: 0 14px;
  }
}
