/* ==========================================================================
 * 基础设计系统（Paper & Ink）
 * 色彩体系 / 字体层级 / 间距规范 / 圆角 / 阴影 / 动效 / 通用组件
 * 站级 token 集中在此，下游样式只消费变量，不写死色值
 * ========================================================================== */

:root {
  /* ---------- 色彩：纸墨体系 ---------- */
  --ink-900: #0f1120;
  --ink-800: #171a2b;
  --ink-700: #232742;
  --ink-500: #474d68;

  --text: #141726;
  --text-sub: #4a5068;
  --muted: #8b91a8;

  --brand: #4f46e5;
  --brand-600: #4338ca;
  --brand-700: #372f9e;
  --brand-soft: #eceafe;
  --brand-tint: #f5f4ff;

  --violet: #7c3aed;
  --accent: #ef8f2b;
  --accent-600: #d9701a;
  --accent-soft: #fdf1e3;

  --line: #e6e5f0;
  --line-strong: #d1d0e2;
  --bg: #f6f5fb;
  --bg-alt: #efedf9;
  --white: #ffffff;

  --success: #0f9a6e;
  --warning: #cf7f13;
  --danger: #dc2f45;
  --info: #4f46e5;

  --paper-warm: #fbf9f4;
  --warm-line: #ece5d8;

  /* ---------- 圆角 ---------- */
  --r-xs: 8px;
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* ---------- 阴影 ---------- */
  --sh-1: 0 1px 2px rgba(20, 23, 38, 0.04), 0 4px 12px rgba(20, 23, 38, 0.04);
  --sh-2: 0 8px 20px rgba(20, 23, 38, 0.07), 0 2px 6px rgba(20, 23, 38, 0.04);
  --sh-3: 0 20px 48px rgba(20, 23, 38, 0.13);
  --sh-brand: 0 10px 26px rgba(79, 70, 229, 0.26);
  --ring: rgba(79, 70, 229, 0.18);
  --ring-accent: rgba(239, 143, 43, 0.22);

  /* ---------- 间距规范 ---------- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* ---------- 动效 ---------- */
  --ease: cubic-bezier(0.22, 0.72, 0.28, 1);
  --ease-spring: cubic-bezier(0.34, 1.42, 0.64, 1);
  --t-fast: 150ms;
  --t: 240ms;
  --t-slow: 420ms;

  /* ---------- 版式 ---------- */
  --container: 1280px;
  --gutter: clamp(14px, 4vw, 36px);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'HarmonyOS Sans SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.68;
  letter-spacing: 0.008em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 页面背景光晕：柔和双色 mesh */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 460px at 8% -10%, rgba(79, 70, 229, 0.1), transparent 68%),
    radial-gradient(760px 420px at 98% 2%, rgba(239, 143, 43, 0.08), transparent 70%),
    radial-gradient(680px 520px at 50% 108%, rgba(124, 58, 237, 0.07), transparent 72%);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}

a:hover {
  color: var(--brand);
}

img,
svg {
  max-width: 100%;
}

img {
  display: block;
}

/* ---------- 字体层级 ---------- */
h1,
h2,
h3,
h4,
h5 {
  margin: 0 0 var(--sp-3);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.022em;
  color: var(--ink-900);
}

h1 {
  font-size: clamp(25px, 1.2vw + 21px, 33px);
}
h2 {
  font-size: clamp(21px, 0.8vw + 18px, 26px);
}
h3 {
  font-size: 18px;
}
h4 {
  font-size: 15.5px;
}
h5 {
  font-size: 14px;
}

p {
  margin: 0 0 var(--sp-3);
}

ul,
ol {
  margin: 0;
  padding-left: 20px;
}

li {
  margin-bottom: 4px;
}

strong,
b {
  font-weight: 700;
  color: var(--ink-800);
}

/* ---------- 容器 ---------- */
.container {
  width: var(--container);
  max-width: calc(100% - var(--gutter) * 2);
  margin: 0 auto;
}

.site-main {
  position: relative;
  z-index: 1;
}

.main-content {
  padding: var(--sp-8) 0 var(--sp-16);
  min-height: 60vh;
}

/* ---------- 通用区块 ---------- */
.section {
  margin-top: var(--sp-12);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

.section-head h2 {
  position: relative;
  margin: 0;
  padding-left: 14px;
}

.section-head h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.22em;
  bottom: 0.22em;
  width: 4px;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, var(--brand) 0%, var(--violet) 100%);
}

.section-head > a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  white-space: nowrap;
}

.section-head > a:hover {
  color: var(--brand);
}

/* ---------- 按钮 ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition: transform var(--t) var(--ease-spring), box-shadow var(--t) var(--ease),
    background-color var(--t) var(--ease), color var(--t) var(--ease),
    border-color var(--t) var(--ease);
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.32), transparent 55%);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
  pointer-events: none;
}

.btn:hover {
  color: var(--brand-700);
  border-color: var(--brand-soft);
  background: var(--brand-tint);
  transform: translateY(-2px);
}

.btn:hover::after {
  opacity: 1;
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--violet) 100%);
  color: #fff;
  box-shadow: var(--sh-brand);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-600) 0%, #6a2fd0 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.34);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-600) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(239, 143, 43, 0.28);
}

.btn-accent:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-600) 0%, #b95c11 100%);
  border-color: transparent;
  box-shadow: 0 14px 28px rgba(239, 143, 43, 0.34);
}

.btn-outline {
  border-color: var(--line-strong);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand-700);
  background: var(--brand-tint);
}

.btn-danger {
  border-color: #f4c7ce;
  color: var(--danger);
  background: var(--white);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  box-shadow: 0 10px 22px rgba(220, 47, 69, 0.26);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-sub);
}

.btn-ghost:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--r-xs);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
  border-radius: 14px;
}

.btn-block {
  width: 100%;
}

.btn[disabled],
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn[disabled]:hover,
.btn.disabled:hover {
  transform: none;
}

/* 文字型操作按钮 */
.link-btn {
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease);
}

.link-btn:hover {
  color: var(--danger);
}

/* ---------- 表单 ---------- */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: var(--sp-2);
}

input[type='text'],
input[type='search'],
input[type='password'],
input[type='number'],
input[type='tel'],
input[type='url'],
input[type='email'],
select,
textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-size: 14.5px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease),
    background-color var(--t) var(--ease);
}

input:hover,
select:hover,
textarea:hover {
  border-color: #b9bcd4;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
  background: #fff;
}

input[readonly] {
  background: var(--bg-alt);
}

textarea {
  resize: vertical;
  min-height: 104px;
  line-height: 1.7;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.form-row {
  margin-bottom: var(--sp-4);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--sp-4);
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 var(--sp-4);
}

.form-actions {
  margin-top: var(--sp-5);
}

.form-hint {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: var(--sp-2);
}

.form-switch {
  margin: var(--sp-4) 0 0;
  font-size: 13.5px;
  color: var(--text-sub);
}

.form-switch a {
  color: var(--brand);
  font-weight: 600;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13.5px;
  color: var(--text);
}

.checkbox-line input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}

input[type='checkbox']:indeterminate {
  accent-color: var(--brand);
}

::-webkit-input-placeholder {
  color: #a5aac0;
}

/* ---------- 卡片 / 面板 ---------- */
.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  padding: var(--sp-6);
  transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease),
    border-color var(--t) var(--ease);
}

.card:hover {
  box-shadow: var(--sh-2);
  border-color: var(--line-strong);
}

.card + .card {
  margin-top: var(--sp-4);
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 1px dashed var(--line);
}

.card-title h3 {
  margin: 0;
}

.card > h3:first-child,
.card > h4:first-child {
  margin-top: 0;
}

.panel {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: var(--sp-4);
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.page-head h1,
.page-head h2 {
  margin: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: var(--sp-5);
}

.breadcrumb a {
  color: var(--text-sub);
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--brand);
}

/* ---------- 键值列表 ---------- */
.kv-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px var(--sp-6);
  margin: 0;
}

.kv-list dt {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
}

.kv-list dd {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  word-break: break-all;
}

/* ---------- 时间线 ---------- */
.timeline {
  list-style: none;
  margin: var(--sp-4) 0 0;
  padding: 0 0 0 var(--sp-6);
  position: relative;
}

.timeline li {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 10px 0;
  margin: 0;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: calc(var(--sp-6) * -1 + 4px);
  top: 17px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.timeline li:first-child::before {
  background: var(--brand);
}

.timeline li::after {
  content: '';
  position: absolute;
  left: calc(var(--sp-6) * -1 + 8px);
  top: 27px;
  bottom: -4px;
  width: 2px;
  background: linear-gradient(180deg, var(--line-strong), transparent);
}

.timeline li:last-child::after {
  display: none;
}

.timeline .time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

/* ---------- 金额行 ---------- */
.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 7px 0;
  font-size: 14px;
  color: var(--text-sub);
}

.summary-line.total {
  margin-top: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* ---------- 表格 ---------- */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  background: var(--white);
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--ink-700);
  white-space: nowrap;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  text-transform: none;
}

.data-table th:first-child {
  border-top-left-radius: var(--r-sm);
}

.data-table th:last-child {
  border-top-right-radius: var(--r-sm);
}

.data-table tbody tr {
  transition: background-color var(--t-fast) var(--ease);
}

.data-table tbody tr:hover {
  background: var(--brand-tint);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table .col-actions {
  white-space: nowrap;
}

.data-table .col-actions form {
  display: inline-block;
  margin-right: var(--sp-2);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--white);
  box-shadow: var(--sh-1);
  -webkit-overflow-scrolling: touch;
}

/* ---------- 徽标 / 状态 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
  background: var(--bg-alt);
  color: var(--text-sub);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.badge-success {
  background: #e2f6ee;
  color: var(--success);
}
.badge-warning {
  background: var(--accent-soft);
  color: var(--warning);
}
.badge-danger {
  background: #fdeaed;
  color: var(--danger);
}
.badge-info {
  background: var(--brand-soft);
  color: var(--brand-700);
}
.badge-brand {
  background: var(--brand-soft);
  color: var(--brand-600);
}

.status-0 {
  color: var(--warning);
}
.status-1 {
  color: var(--info);
}
.status-2 {
  color: var(--info);
}
.status-3 {
  color: var(--success);
}
.status-4 {
  color: var(--muted);
}

/* ---------- 提示条 ---------- */
.alert {
  position: relative;
  padding: 13px 18px 13px 20px;
  border-radius: var(--r-sm);
  margin-bottom: var(--sp-4);
  font-size: 13.5px;
  line-height: 1.7;
  border: 1px solid transparent;
  animation: rise var(--t-slow) var(--ease) both;
}

.alert::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: var(--r-pill);
  background: currentColor;
  opacity: 0.55;
}

.alert-success {
  background: #e4f7ef;
  color: #0a6e4d;
  border-color: #c2e9d9;
}

.alert-error {
  background: #fdedf0;
  color: #b3283c;
  border-color: #f8ccd3;
}

.alert-warning {
  background: var(--accent-soft);
  color: #97590c;
  border-color: #f8dcbb;
}

.alert-info {
  background: var(--brand-soft);
  color: var(--brand-700);
  border-color: #d3d0fb;
}

/* ---------- 价格 ---------- */
.price {
  color: var(--accent-600);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.price-lg {
  font-size: 27px;
}

.price-suffix {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  margin-left: 2px;
}

.sales {
  color: var(--muted);
  font-size: 12px;
}

/* ---------- 分页 ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-10);
}

.pagination a,
.pagination span {
  min-width: 40px;
  height: 40px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-sub);
  transition: all var(--t-fast) var(--ease);
}

.pagination a:hover {
  border-color: var(--brand);
  color: var(--brand-700);
  background: var(--brand-tint);
  transform: translateY(-2px);
}

.pagination .active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--violet) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--sh-brand);
}

.pagination .disabled {
  opacity: 0.45;
}

.pagination .ellipsis,
.pagination .page-total {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}

/* ---------- 空状态 / 错误页 ---------- */
.empty {
  text-align: center;
  padding: var(--sp-16) var(--sp-5);
  color: var(--muted);
  background: var(--white);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
}

.empty-icon {
  font-size: 42px;
  margin-bottom: var(--sp-3);
  opacity: 0.5;
}

.error-page {
  text-align: center;
  padding: var(--sp-16) var(--sp-5);
}

.error-code {
  font-size: clamp(64px, 12vw, 92px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: var(--sp-3);
  background: linear-gradient(135deg, var(--brand) 0%, var(--violet) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--sp-5);
}

/* ---------- 工具类 ---------- */
.muted {
  color: var(--muted);
}
.text-sub {
  color: var(--text-sub);
}
.text-right {
  text-align: right;
}
.text-center {
  text-align: center;
}
.nowrap {
  white-space: nowrap;
}
.text-danger {
  color: var(--danger);
}
.mt-8 {
  margin-top: var(--sp-2);
}
.mt-16 {
  margin-top: var(--sp-4);
}
.mt-24 {
  margin-top: var(--sp-6);
}
.mb-0 {
  margin-bottom: 0;
}
.mb-8 {
  margin-bottom: var(--sp-2);
}
.mb-16 {
  margin-bottom: var(--sp-4);
}
.flex {
  display: flex;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.flex-center {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.flex-wrap {
  flex-wrap: wrap;
}
.grow {
  flex: 1;
  min-width: 0;
}
.hidden {
  display: none !important;
}
[hidden] {
  display: none !important;
}

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: 104px;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: var(--r-pill);
  background: rgba(15, 17, 32, 0.93);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  z-index: 400;
  box-shadow: var(--sh-3);
  max-width: 82vw;
  text-align: center;
  animation: toast-in var(--t-slow) var(--ease-spring) both;
  backdrop-filter: blur(10px);
}

.toast-success {
  background: rgba(15, 154, 110, 0.95);
}

.toast-error {
  background: rgba(220, 47, 69, 0.95);
}

/* ---------- 动效关键帧 ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -16px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes zoom-in {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.09);
  }
}

@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes sheen {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(220%);
  }
}

/* 滚动入场：通用淡入上移 */
@keyframes section-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 站点标识（Logo） ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  color: var(--ink-900);
  transition: background-color var(--t) var(--ease);
}

.brand:hover {
  background: var(--brand-tint);
}

.brand-emblem {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--brand) 0%, var(--violet) 55%, #2a2560 100%);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden;
  transition: transform var(--t-slow) var(--ease-spring), box-shadow var(--t-slow) var(--ease);
}

.brand-emblem::before {
  content: '';
  position: absolute;
  inset: -40% -40% auto auto;
  width: 90%;
  height: 140%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.34), transparent 62%);
  pointer-events: none;
}

.brand-emblem-ring {
  position: absolute;
  inset: -5px;
  border-radius: 18px;
  border: 1px dashed rgba(239, 143, 43, 0.6);
  opacity: 0;
  transform: scale(0.86) rotate(0deg);
  transition: opacity var(--t) var(--ease), transform var(--t-slow) var(--ease-spring);
}

.brand-emblem-icon {
  position: relative;
  width: 26px;
  height: 26px;
}

.brand:hover .brand-emblem {
  transform: translateY(-3px) rotate(-7deg);
  box-shadow: 0 16px 30px rgba(79, 70, 229, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.brand:hover .brand-emblem-ring {
  opacity: 1;
  transform: scale(1) rotate(18deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.2;
  white-space: nowrap;
  color: inherit;
}

.brand-badge {
  padding: 2px 8px;
  border-radius: var(--r-xs);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--accent-600);
  background: var(--accent-soft);
  border: 1px solid rgba(239, 143, 43, 0.28);
}

.brand-slogan {
  max-width: 240px;
  font-size: 11.5px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 紧凑版：控制台头部 */
.brand-compact {
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-2);
}

.brand-compact .brand-emblem {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.brand-compact .brand-emblem-icon {
  width: 20px;
  height: 20px;
}

.brand-compact .brand-name {
  font-size: 16px;
}

/* 大号版：登录 / 入驻独立页 */
.brand-hero {
  gap: var(--sp-3);
}

.brand-hero .brand-emblem {
  width: 56px;
  height: 56px;
  border-radius: 17px;
}

.brand-hero .brand-emblem-icon {
  width: 32px;
  height: 32px;
}

.brand-hero .brand-name {
  font-size: 22px;
}

/* 深色底版 */
.brand-light {
  color: #fff;
}

.brand-light:hover {
  background: rgba(255, 255, 255, 0.1);
}

.brand-light .brand-slogan {
  color: rgba(255, 255, 255, 0.62);
}

.brand-light .brand-badge {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

.brand-light .brand-emblem-ring {
  border-color: rgba(255, 255, 255, 0.42);
}

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cfcfe4;
  border-radius: var(--r-pill);
  border: 3px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: #b3b3ce;
  background-clip: content-box;
}

/* ---------- 无障碍：减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 720px) {
  .brand-slogan {
    display: none;
  }
  .main-content {
    padding-top: var(--sp-5);
  }
  .card {
    padding: var(--sp-5);
  }
  .kv-list {
    grid-template-columns: 1fr;
    gap: 2px var(--sp-4);
  }
  .kv-list dd {
    margin-bottom: 6px;
  }
}
