/* ============================ 基础重置 ============================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink-800);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

#app {
  min-height: 100%;
}

h1, h2, h3, h4, h5, p, figure {
  margin: 0;
}

a {
  color: var(--brand-600);
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

img {
  max-width: 100%;
  display: block;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: rgba(11, 18, 32, 0.16);
  border-radius: 999px;
}
::-webkit-scrollbar-track {
  background: transparent;
}

:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 2px;
}

/* ============================ 启动态 ============================ */
.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--grad-brand);
  color: #fff;
}
.boot__logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
}
.boot__name {
  font-size: 18px;
  letter-spacing: 6px;
  font-weight: 600;
}
.boot__hint {
  font-size: 12px;
  opacity: 0.72;
}

/* ============================ 版式 ============================ */
.t-page {
  animation: page-in 0.26s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.t-h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.2px; color: var(--ink-900); }
.t-h2 { font-size: 17px; font-weight: 650; color: var(--ink-900); }
.t-h3 { font-size: 15px; font-weight: 600; color: var(--ink-800); }
.t-body { font-size: 14px; color: var(--ink-700); }
.t-sub { font-size: 13px; color: var(--ink-500); }
.t-xs { font-size: 12px; color: var(--ink-400); }
.t-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.t-num { font-variant-numeric: tabular-nums; }
.t-muted { color: var(--ink-400); }
.t-brand { color: var(--brand-600); }
.t-danger { color: var(--danger); }
.t-success { color: var(--success); }
.t-warn { color: var(--warn); }
.t-bold { font-weight: 650; }
.t-center { text-align: center; }
.t-right { text-align: right; }
.t-nowrap { white-space: nowrap; }
.t-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================ 工具 ============================ */
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.row-end { display: flex; align-items: center; justify-content: flex-end; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1 1 auto; min-width: 0; }
.gap-1 { gap: var(--gap-1); }
.gap-2 { gap: var(--gap-2); }
.gap-3 { gap: var(--gap-3); }
.gap-4 { gap: var(--gap-4); }
.gap-5 { gap: var(--gap-5); }
.gap-6 { gap: var(--gap-6); }
.wrap { flex-wrap: wrap; }
.mt-1 { margin-top: var(--gap-1); }
.mt-2 { margin-top: var(--gap-2); }
.mt-3 { margin-top: var(--gap-3); }
.mt-4 { margin-top: var(--gap-4); }
.mt-5 { margin-top: var(--gap-5); }
.mt-6 { margin-top: var(--gap-6); }
.mb-3 { margin-bottom: var(--gap-3); }
.mb-4 { margin-bottom: var(--gap-4); }
.hide { display: none !important; }

@media (min-width: 1024px) {
  .only-mobile { display: none !important; }
}
@media (max-width: 1023px) {
  .only-desktop { display: none !important; }
}

/* 安全区 */
.safe-bottom { padding-bottom: calc(var(--gap-4) + var(--safe-bottom)); }
