:root {
  /* === 与 HeroUI 兼容的核心令牌 === */
  /* HeroUI 使用 --background/--foreground/--accent/--radius/--spacing 等。
     我们在保留语义的同时，将视觉调向 Apple HIG 的清爽专业风格。 */

  color-scheme: light;

  /* 背景层：从暖黄绿改为冷白 + 极淡青灰，长时间操作更不易疲劳 */
  --background: #fafcfb;
  --foreground: #1d1d1f;

  /* 内容表面 */
  --content1: #ffffff;
  --content2: #f4f7f6;
  --content3: #e8eeec;

  /* 品牌与语义色：保留深绿，但引入更清新的辅助色 */
  --primary: #0b5738;
  --primary-foreground: #ffffff;
  --primary-hover: #073d29;
  --primary-soft: #e7f2ed;

  --accent: #147a5f;
  --accent-foreground: #ffffff;
  --accent-hover: #0e5e49;
  --accent-soft: #e0f2ec;

  --success: #34c759;
  --success-foreground: #ffffff;
  --success-soft: #e6f9ec;

  --warning: #ff9500;
  --warning-foreground: #1d1d1f;
  --warning-soft: #fff4e5;

  --danger: #ff3b30;
  --danger-foreground: #ffffff;
  --danger-soft: #ffeceb;

  --info: #007aff;
  --info-soft: #e6f2ff;

  /* 中性色 */
  --default: #f2f4f3;
  --default-hover: #e8ecea;
  --default-foreground: #1d1d1f;

  --muted: #6e6e73;
  --muted-light: #a1a1a6;
  --placeholder: #c7c7cc;

  --border: #d2d2d7;
  --border-strong: #b9b9bf;
  --separator: #e5e5ea;

  /* 字段 */
  --field-background: #ffffff;
  --field-foreground: #1d1d1f;
  --field-border: #c7c7cc;
  --field-border-hover: #8e8e93;
  --field-border-focus: var(--primary);
  --field-border-width: 1px;

  /* 圆角：比原方案更克制，符合 Apple 大圆角卡片风格 */
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* 阴影：更柔和、更浅 */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.07);

  /* 字体：优先 Apple 系统字体栈 */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text",
    "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Consolas,
    monospace;
  --font-serif: "Instrument Serif", Georgia, "STSong", "Songti SC", serif;

  /* 排版比例 */
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* 间距 */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* 动效 */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 120ms;
  --duration-normal: 200ms;
  --duration-slow: 300ms;

  /* 布局 */
  --max-width-content: 720px;
  --max-width-wide: 1100px;
  --header-height: 72px;
}

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

html {
  min-width: 320px;
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--foreground);
  background: var(--background);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

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

code {
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}

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

/* === 背景动效层 === */
/* 基于 /Users/sumer/Downloads/背景动效.json 的 four-stop flow 配色 */
.ambient-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    #f2fdf9 0%,
    #a8f0dc 35%,
    #52cbb0 70%,
    #147a5f 100%
  );
}

.ambient-background::before,
.ambient-background::after {
  content: "";
  position: absolute;
  inset: -50%;
  background: radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 255, 255, 0) 50%
    ),
    radial-gradient(
      circle at 70% 70%,
      rgba(20, 122, 95, 0.18) 0%,
      rgba(20, 122, 95, 0) 55%
    );
  mix-blend-mode: soft-light;
  animation: ambient-flow 30s var(--ease-smooth) infinite alternate;
}

.ambient-background::after {
  animation-duration: 45s;
  animation-direction: alternate-reverse;
  background: radial-gradient(
      circle at 60% 20%,
      rgba(168, 240, 220, 0.45) 0%,
      rgba(168, 240, 220, 0) 50%
    ),
    radial-gradient(
      circle at 20% 80%,
      rgba(82, 203, 176, 0.22) 0%,
      rgba(82, 203, 176, 0) 55%
    );
}

@keyframes ambient-flow {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  33% {
    transform: translate3d(8%, -6%, 0) scale(1.08);
  }
  66% {
    transform: translate3d(-5%, 7%, 0) scale(1.04);
  }
  100% {
    transform: translate3d(3%, 4%, 0) scale(1.1);
  }
}

/* 在主要操作区之上的内容遮罩，保证文字可读性 */
.ambient-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(250, 252, 251, 0.92) 0%,
    rgba(250, 252, 251, 0.78) 50%,
    rgba(250, 252, 251, 0.65) 100%
  );
}

/* === 布局 === */
.page-shell,
.message-stack,
.site-footer {
  position: relative;
  z-index: 1;
}

.page-shell {
  width: min(var(--max-width-wide), calc(100% - var(--space-8)));
  min-height: calc(100vh - var(--header-height) - 80px);
  margin: 0 auto;
  padding: var(--space-10) 0 var(--space-16);
}

/* main 仅承接跳转焦点，不显示贯穿整页的交互控件轮廓。 */
.page-shell:focus-visible {
  outline: none;
}

.content-narrow {
  width: min(var(--max-width-content), calc(100% - var(--space-8)));
  margin: 0 auto;
}

/* === 站点头部 === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--separator);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: var(--text-lg);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1.2;
  color: var(--foreground);
}

.brand-subtitle {
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.2;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.site-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
  transition: color var(--duration-fast) var(--ease-smooth),
    background-color var(--duration-fast) var(--ease-smooth);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--primary);
  background: var(--primary-soft);
}

.site-nav a[aria-current="page"] {
  color: var(--primary);
  background: var(--primary-soft);
}

.account-menu {
  position: relative;
}

.account-menu-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-smooth),
    background-color var(--duration-fast) var(--ease-smooth);
}

.account-menu-button:hover,
.account-menu-button:focus-visible {
  color: var(--primary);
  background: var(--primary-soft);
}

.account-menu-dropdown {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  min-width: 160px;
  margin: 0;
  padding: var(--space-2);
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow-lg);
  z-index: 200;
}

.account-menu-dropdown[hidden] {
  display: none;
}

.account-menu-dropdown a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--foreground);
  transition: background-color var(--duration-fast) var(--ease-smooth);
}

.account-menu-dropdown a:hover,
.account-menu-dropdown a:focus-visible {
  background: var(--primary-soft);
  color: var(--primary);
  outline: none;
}

/* === 跳过链接 === */
.skip-link {
  position: fixed;
  top: var(--space-2);
  left: var(--space-3);
  z-index: 1001;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  color: var(--primary-foreground);
  background: var(--primary);
  font-size: var(--text-sm);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform var(--duration-fast) var(--ease-smooth);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* === 排版 === */
.page-heading {
  max-width: 640px;
  margin-bottom: var(--space-8);
}

.eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-heading h1,
.section-heading h2,
.article-header h1 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.page-heading h1 {
  font-size: var(--text-4xl);
}

.page-heading p,
.section-heading > p,
.article-header > p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-base);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-6);
  margin-bottom: var(--space-5);
}

.section-heading h2 {
  font-size: var(--text-2xl);
  margin: 0;
}

/* === 卡片 === */
.ui-card {
  background: var(--content1);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-fast) var(--ease-smooth),
    transform var(--duration-fast) var(--ease-smooth);
}

.ui-card:hover {
  box-shadow: var(--shadow-md);
}

.ui-card-elevated {
  box-shadow: var(--shadow-md);
}

.ui-card-elevated:hover {
  box-shadow: var(--shadow-lg);
}

/* === 按钮 === */
.ui-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-smooth),
    border-color var(--duration-fast) var(--ease-smooth),
    color var(--duration-fast) var(--ease-smooth),
    transform var(--duration-fast) var(--ease-smooth),
    box-shadow var(--duration-fast) var(--ease-smooth);
}

.ui-button:hover {
  transform: translateY(-1px);
}

.ui-button:active {
  transform: translateY(0);
}

.ui-button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.ui-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.ui-button-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.ui-button-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
}

.ui-button-secondary {
  background: var(--content1);
  color: var(--primary);
  border-color: var(--border-strong);
}

.ui-button-secondary:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.ui-button-ghost {
  background: transparent;
  color: var(--primary);
}

.ui-button-ghost:hover {
  background: var(--primary-soft);
}

.ui-button-danger {
  background: var(--danger);
  color: var(--danger-foreground);
}

.ui-button-danger:hover {
  background: #d93228;
}

.ui-button-lg {
  min-height: 52px;
  padding: 0 var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

.ui-button-sm {
  min-height: 36px;
  padding: 0 var(--space-4);
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
}

.ui-button-full {
  width: 100%;
}

/* 图标按钮 */
.ui-icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* === 表单 === */
.field-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field-group label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--foreground);
}

.field-group small {
  font-size: var(--text-xs);
  color: var(--muted);
}

.ui-input,
.ui-select,
.ui-textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  border: var(--field-border-width) solid var(--field-border);
  border-radius: var(--radius-lg);
  background: var(--field-background);
  color: var(--field-foreground);
  font-size: var(--text-base);
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-smooth),
    box-shadow var(--duration-fast) var(--ease-smooth);
}

.ui-input:hover,
.ui-select:hover,
.ui-textarea:hover {
  border-color: var(--field-border-hover);
}

.ui-input:focus,
.ui-select:focus,
.ui-textarea:focus {
  border-color: var(--field-border-focus);
  box-shadow: 0 0 0 3px rgba(11, 87, 56, 0.12);
}

.ui-input:disabled,
.ui-select:disabled,
.ui-textarea:disabled {
  background: var(--content2);
  cursor: not-allowed;
}

.ui-textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}

/* === 状态徽章 === */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 28px;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-succeeded,
.status-ready {
  color: var(--success);
  background: var(--success-soft);
}

.status-partial,
.status-running,
.status-stale {
  color: #c97700;
  background: var(--warning-soft);
}

.status-failed,
.status-abandoned,
.status-blocked,
.status-removed {
  color: var(--danger);
  background: var(--danger-soft);
}

.status-badge-lg {
  min-height: 36px;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

/* === 提示与通知 === */
.ui-alert {
  margin: 0 0 var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.ui-alert-info {
  color: var(--info);
  background: var(--info-soft);
}

.ui-alert-success {
  color: #1d7a35;
  background: var(--success-soft);
}

.ui-alert-warning {
  color: #9c5a00;
  background: var(--warning-soft);
}

.ui-alert-error {
  color: #c41c14;
  background: var(--danger-soft);
}

/* === 面包屑 === */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: calc(-1 * var(--space-4));
  margin-bottom: var(--space-5);
  color: var(--muted);
  font-size: var(--text-base);
  font-weight: 500;
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 650;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* === 空状态 === */
.empty-state {
  padding: var(--space-12) var(--space-8);
  text-align: center;
  color: var(--muted);
  background: var(--content1);
  border: 1px dashed var(--border);
  border-radius: var(--radius-2xl);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-5);
  display: grid;
  place-items: center;
  border-radius: var(--radius-xl);
  background: var(--content2);
  color: var(--muted);
  font-size: var(--text-2xl);
}

.empty-state-title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--foreground);
}

.empty-state p {
  margin: 0;
  font-size: var(--text-sm);
}

/* === 折叠面板 === */
.ui-disclosure {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--content1);
  overflow: hidden;
}

.ui-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  font-weight: 700;
  font-size: var(--text-sm);
  list-style: none;
  user-select: none;
}

.ui-disclosure summary::-webkit-details-marker {
  display: none;
}

.ui-disclosure summary::after {
  content: "▸";
  color: var(--muted);
  transition: transform var(--duration-fast) var(--ease-smooth);
}

.ui-disclosure[open] summary::after {
  transform: rotate(90deg);
}

.ui-disclosure-content {
  padding: 0 var(--space-5) var(--space-5);
}

/* === 步骤指示器 === */
.step-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
}

.step-number {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--content2);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
}

.step-active .step-number {
  background: var(--primary);
  color: var(--primary-foreground);
}

.step-active {
  color: var(--foreground);
}

.step-completed .step-number {
  background: var(--success);
  color: var(--success-foreground);
}

.step-divider {
  flex: 0 0 24px;
  height: 1px;
  background: var(--border);
}

/* === 处理中动画 === */
.processing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-light);
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

.processing-ring {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* === Toast === */
.toast-stack {
  position: fixed;
  top: calc(var(--header-height) + var(--space-4));
  right: var(--space-6);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-xl);
  background: rgba(29, 29, 31, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: white;
  font-size: var(--text-sm);
  box-shadow: var(--shadow-xl);
  animation: toast-in var(--duration-slow) var(--ease-spring);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* === 表格 === */
.ui-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.ui-table th,
.ui-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--separator);
}

.ui-table th {
  font-weight: 700;
  color: var(--muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--content2);
}

.ui-table tbody tr:hover {
  background: var(--content2);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--content1);
}

/* === 发布操作面板 === */
.publish-panel {
  position: sticky;
  top: calc(var(--header-height) + var(--space-6));
  padding: var(--space-6);
  background: var(--content1);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
}

.publish-panel-title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-base);
  font-weight: 700;
}

.publish-panel-subtitle {
  margin: 0 0 var(--space-5);
  font-size: var(--text-sm);
  color: var(--muted);
}

.copy-action-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.copy-status {
  margin: var(--space-3) 0 0;
  font-size: var(--text-xs);
  color: var(--muted);
  min-height: 1.5em;
}

/* === 终审清单 === */
.review-checklist {
  display: grid;
  gap: var(--space-3);
}

.review-checklist label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--content1);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-smooth),
    border-color var(--duration-fast) var(--ease-smooth);
}

.review-checklist label:hover {
  background: var(--content2);
}

.review-checklist input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--primary);
  flex: 0 0 auto;
}

/* === 页脚 === */
.site-footer {
  padding: var(--space-6) var(--space-8);
  text-align: center;
  color: var(--muted);
  font-size: var(--text-xs);
  border-top: 1px solid var(--separator);
  background: var(--content1);
}

/* === 响应式 === */
@media (max-width: 900px) {
  .page-shell {
    padding: var(--space-8) 0 var(--space-12);
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .publish-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 0 var(--space-4);
  }

  .brand-subtitle {
    display: none;
  }

  .site-nav a {
    padding: 0 var(--space-3);
    font-size: var(--text-xs);
  }

  .page-heading h1 {
    font-size: var(--text-3xl);
  }

  .step-indicator {
    flex-wrap: wrap;
  }

  .step-divider {
    display: none;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - var(--space-6), var(--max-width-wide));
    padding-top: var(--space-6);
  }

  .breadcrumb {
    margin-top: 0;
  }

  .ui-button-lg {
    width: 100%;
  }

  .publish-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
    z-index: 90;
  }

  body.has-sticky-panel {
    padding-bottom: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === 焦点样式统一 === */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* === 工具类 === */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.font-mono { font-family: var(--font-mono); }
.font-serif { font-family: var(--font-serif); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.bg-content1 { background: var(--content1); }
.bg-content2 { background: var(--content2); }
.bg-primary-soft { background: var(--primary-soft); }

.border { border: 1px solid var(--border); }
.border-separator { border-color: var(--separator); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
