/* 定义全局变量 */
:root {
  /* 背景和文本颜色 */
  --bg-color: rgba(255, 255, 255, 0); /* 默认背景色 */
  --text-color: #333; /* 默认文本颜色 */
  --nav-bg-color: rgba(255, 255, 255, 0.7); /* 导航栏背景色 */
  --nav-text-color: #444; /* 导航栏文本颜色 */
  --canvas-bg: rgba(255, 255, 255, 1); /* 背景画布颜色 */
  --card-bg-color: #fff; /* 卡片背景色 */
  --card-border-color: #e0e0e0; /* 卡片边框颜色 */
  --link-color: #3366cc; /* 默认链接颜色 */
  --meta-text-color: #666; /* 元数据文本颜色 */
  --footer-bg: #f9f9f9; /* 页脚背景色 */
  --quick-card-bg: rgba(255, 255, 255, 0.5); /* 快捷卡片背景色 */
  --quick-card-hover-bg: rgba(255, 255, 255, 0.7); /* 快捷卡片悬停背景色 */
  --quick-label-color: #222; /* 快捷标签颜色 */

  --inline-code-bg: rgba(230,236,240,0.4);
  --inline-code-color: #bf2c2c;
  --code-block-bg: #f0f4f8;
  --blockquote-bg: #f9f9f9;
  --blockquote-color: #586069;
  --heading-color: #2f363d;
  /* 按钮样式 */
  --btn-bg-color: #3366cc; /* 默认按钮背景色 */
  --btn-hover-bg-color: #0055cc; /* 按钮悬停时的背景色 */
  --btn-text-color: #fff; /* 按钮文本颜色 */

  /* 输入框、选择框、文本框样式 */
  --input-bg-color: #fff; /* 输入框背景色 */
  --input-border-color: #ccc; /* 输入框边框色 */
  --input-focus-border-color: #3366cc; /* 输入框聚焦时的边框颜色 */
}

/* 暗色模式下的变量 */
[data-theme="dark"] {
  --bg-color: rgba(18, 18, 18, 0); /* 暗模式背景色 */
  --text-color: #eee; /* 暗模式文本颜色 */
  --nav-bg-color: rgba(20, 20, 20, 0.7); /* 暗模式导航栏背景色 */
  --nav-text-color: #ccc; /* 暗模式导航栏文本颜色 */
  --canvas-bg: rgba(18, 18, 18, 1); /* 暗模式主要内容背景色 */
  --card-bg-color: #242424; /* 暗模式卡片背景色 */
  --card-border-color: #333; /* 暗模式卡片边框颜色 */
  --link-color: #6699ff; /* 暗模式链接颜色 */
  --meta-text-color: #aaa; /* 暗模式元数据文本颜色 */
  --footer-bg: #181818; /* 暗模式页脚背景色 */
  --quick-card-bg: rgba(40, 40, 40, 0.5); /* 暗模式快捷卡片背景色 */
  --quick-card-hover-bg: rgba(60, 60, 60, 0.7); /* 暗模式快捷卡片悬停背景色 */
  --quick-label-color: #ddd; /* 暗模式快捷标签颜色 */

  --inline-code-bg: rgba(75, 85, 99, 0.4);  /* slate-600@40% */
  --inline-code-color: #f87171;             /* red-400，提升可读性 */
  --code-block-bg: rgba(30, 41, 59, 0.8);    /* slate-800@80% */
  --blockquote-bg: rgba(55, 65, 81, 0.5);    /* slate-700@50% */
  --blockquote-color: #9ca3af;              /* slate-400 */
  --heading-color: #f3f4f6;                  /* gray-100，清晰突出 */

  /* 按钮样式 */
  --btn-bg-color: #6699ff; /* 暗模式按钮背景色 */
  --btn-hover-bg-color: #3366cc; /* 暗模式按钮悬停时的背景色 */
  --btn-text-color: #fff; /* 暗模式按钮文本颜色 */

  /* 输入框、选择框、文本框样式 */
  --input-bg-color: #333; /* 暗模式输入框背景色 */
  --input-border-color: #666; /* 暗模式输入框边框色 */
  --input-focus-border-color: #6699ff; /* 暗模式输入框聚焦时的边框颜色 */
}

/* 页面字体和基本布局 */
body {
  font-family: Arial, sans-serif; /* 设置字体 */
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background: var(--bg-color); /* 使用全局背景颜色 */
  color: var(--text-color); /* 使用全局文本颜色 */
}

/* 背景画布 */
#universe {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* 背景画布位于最底层 */
  pointer-events: none; /* 禁止背景画布与鼠标交互 */
  background-color: var(--canvas-bg); /* 使用全局的画布背景色 */
}

/* 闪现通知 */
.flash-stack {
  position: fixed;
  top: clamp(90px, 9vh, 120px);
  right: clamp(16px, 4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 2050;
  pointer-events: none;
}

.flash-card {
  --flash-accent: rgba(59, 130, 246, 0.75);
  --flash-border: rgba(148, 163, 184, 0.35);
  --flash-bg: linear-gradient(135deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.82));
  --flash-text: var(--text-color);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  min-width: min(440px, calc(100vw - 32px));
  padding: 16px 18px 16px 24px;
  border-radius: 20px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: var(--flash-bg);
  border: 1px solid var(--flash-border);
  color: var(--flash-text);
  box-shadow: 0 28px 48px rgba(15, 23, 42, 0.14);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-12px) scale(0.96);
  animation: flash-enter 0.45s ease forwards;
}

[data-theme="dark"] .flash-card {
  --flash-border: rgba(148, 163, 184, 0.18);
  --flash-bg: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(17, 24, 39, 0.88));
  --flash-text: #f1f5f9;
  box-shadow: 0 22px 40px rgba(3, 7, 18, 0.6);
}

.flash-card::before {
  content: "";
  position: absolute;
  inset-block: 14px;
  inset-inline-start: 10px;
  width: 4px;
  border-radius: 999px;
  background: var(--flash-accent);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--flash-accent) 45%, transparent);
}

.flash-card.flash-success {
  --flash-accent: #16a34a;
}

.flash-card.flash-warning {
  --flash-accent: #f97316;
}

.flash-card.flash-error {
  --flash-accent: #ef4444;
}

.flash-card.flash-info {
  --flash-accent: #3b82f6;
}

.flash-card.flash-leave {
  animation: flash-exit 0.32s ease forwards;
}

.flash-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--flash-accent) 24%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.flash-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--flash-accent);
}

.flash-message-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.flash-close {
  appearance: none;
  border: none;
  background: transparent;
  padding: 6px;
  margin: -6px -4px -6px 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  color: inherit;
}

.flash-close svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.flash-close:hover {
  background: color-mix(in srgb, var(--flash-accent) 16%, transparent);
  transform: scale(1.04);
}

.flash-close:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--flash-accent) 65%, #ffffff 35%);
  outline-offset: 2px;
}

@keyframes flash-enter {
  0% {
    opacity: 0;
    transform: translateY(-14px) scale(0.94);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes flash-exit {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-12px) scale(0.95);
  }
}

@media (max-width: 640px) {
  .flash-stack {
    top: clamp(72px, 12vh, 96px);
    right: 16px;
    left: 16px;
  }

  .flash-card {
    min-width: 0;
    width: 100%;
    padding-inline: 18px;
    grid-template-columns: auto 1fr auto;
  }
}

/* 液态玻璃导航栏 */
.global-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 18px clamp(16px, 4vw, 28px);
  z-index: 1040;
  pointer-events: none;
  display: flex;
  justify-content: center;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.global-header.nav-hidden {
  transform: translateY(calc(-100% - 24px));
  opacity: 0;
}

.glass-nav {
  pointer-events: auto;
  width: min(100%, 1120px);
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 4vw, 28px);
  padding: clamp(10px, 2vw, 16px) clamp(18px, 4vw, 28px);
  border-radius: 32px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
}

.nav-brand .brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-logo {
  height: 42px;
  width: 42px;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(148, 163, 184, 0.25);
  transition: transform 0.4s ease;
}

.brand-link:hover .brand-logo {
  transform: rotate(360deg) scale(1.08);
}

.brand-title {
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: clamp(14px, 3vw, 24px);
  flex-wrap: wrap;
}

.nav-link {
  position: relative;
  text-decoration: none;
  font-weight: 600;
  color: var(--nav-text-color);
  padding: 8px 10px;
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.4), rgba(14, 165, 233, 0.55));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.nav-link:hover {
  color: var(--text-color);
  transform: translateY(-1px);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(226, 232, 240, 0.55));
  box-shadow: 0 16px 32px rgba(148, 163, 184, 0.25);
  color: var(--text-color);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.nav-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(59, 130, 246, 0.28);
}

.nav-action:active {
  transform: translateY(0);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.25);
}

.nav-action:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.6);
  outline-offset: 3px;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

svg.icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

svg.icon.is-solid {
  fill: currentColor;
  stroke: none;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-icon .fill {
  fill: currentColor;
  stroke: none;
}

.nav-theme .icon-sun {
  display: none;
}

[data-theme="dark"] .nav-theme .icon-sun {
  display: block;
}

[data-theme="dark"] .nav-theme .icon-moon {
  display: none;
}







#theme-toggle {
  border: none;
  background: none;
}

/* -------------------------------------------------------
 * 首页布局
 * ----------------------------------------------------- */
.home-shell {
  display: grid;
  gap: clamp(24px, 5vw, 40px);
}

@keyframes heroPulse {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: 0.75;
  }
  50% {
    transform: rotate(30deg) scale(1.05);
    opacity: 0.95;
  }
  100% {
    transform: rotate(360deg) scale(1);
    opacity: 0.75;
  }
}

@keyframes bubbleFloat {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.02);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.home-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(36px, 8vw, 64px);
  border-radius: 32px;
  background: radial-gradient(circle at 20% -20%, rgba(96, 165, 250, 0.32), transparent 55%),
              radial-gradient(circle at 80% 120%, rgba(244, 114, 182, 0.28), transparent 60%),
              rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 35px 60px rgba(59, 130, 246, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  isolation: isolate;
}

.home-hero-glow {
  position: absolute;
  inset: -40% -50%;
  background: conic-gradient(from 140deg, rgba(59, 130, 246, 0.35), rgba(244, 114, 182, 0.25), rgba(45, 212, 191, 0.28), rgba(59, 130, 246, 0.35));
  filter: blur(80px);
  opacity: 0.8;
  animation: heroPulse 12s linear infinite;
  pointer-events: none;
  z-index: -1;
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6.4vw, 3.1rem);
  color: var(--text-color);
  letter-spacing: 0.02em;
}

.home-hero p {
  margin: 12px auto 0;
  font-size: 1.05rem;
  color: rgba(15, 23, 42, 0.72);
  max-width: min(480px, 90%);
}

.home-search {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin: clamp(18px, 4vw, 32px) auto 0;
  padding: clamp(14px, 3.2vw, 20px) clamp(16px, 3.8vw, 28px);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(226, 232, 240, 0.64));
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 22px 44px rgba(30, 64, 175, 0.16);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  max-width: min(540px, 100%);
  width: 100%;
  box-sizing: border-box;
}

.home-search-icon {
  width: clamp(32px, 8vw, 38px);
  height: clamp(32px, 8vw, 38px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: rgba(37, 99, 235, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  flex: 0 0 clamp(32px, 8vw, 38px);
}

.home-search form {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

.home-search input[type="text"] {
  width: 100%;
  border: none;
  background: transparent;
  font-size: clamp(0.95rem, 2.8vw, 1.05rem);
  color: var(--text-color);
  outline: none;
  text-align: center;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(16px, 4.5vw, 28px);
}

.quick-card {
  position: relative;
  padding: clamp(18px, 4.2vw, 28px);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.28);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: visible;
  z-index: 1;
  isolation: isolate;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.quick-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  background: radial-gradient(circle at 12% 18%, rgba(59, 130, 246, 0.28), transparent 55%),
              radial-gradient(circle at 80% 80%, rgba(244, 114, 182, 0.22), transparent 60%);
  filter: blur(32px);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.quick-card:hover,
.quick-card:focus-within,
.quick-card.is-active {
  transform: translateY(-4px);
  box-shadow: 0 32px 54px rgba(37, 99, 235, 0.18);
  border-color: rgba(59, 130, 246, 0.45);
  z-index: 60;
}

.quick-admin {
  display: grid;
  gap: 22px;
}

.quick-admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.quick-admin-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-color);
}

.quick-admin-sub {
  margin: 4px 0 0;
  color: rgba(71, 85, 105, 0.7);
  font-size: 0.92rem;
}

.quick-admin-list {
  display: grid;
  gap: 16px;
}

.quick-admin-item {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 44px rgba(15, 23, 42, 0.12);
}

.quick-admin-row {
  display: flex;
  gap: 16px;
  flex: 1 1 320px;
  min-width: 240px;
}

.quick-admin-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: rgba(59, 130, 246, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 16px 30px rgba(59, 130, 246, 0.16);
}

.quick-admin-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quick-admin-icon span {
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
}

.quick-admin-body {
  display: grid;
  gap: 6px;
  flex: 1;
}

.quick-admin-name {
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
}

.quick-admin-name:hover {
  text-decoration: underline;
}

.quick-admin-url {
  font-size: 0.88rem;
  color: rgba(71, 85, 105, 0.7);
  word-break: break-all;
}

.quick-admin-note {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: rgba(51, 65, 85, 0.8);
  line-height: 1.45;
}

.quick-admin-children {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.quick-admin-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.14);
  color: rgba(30, 41, 59, 0.85);
  font-size: 0.8rem;
  text-decoration: none;
}

.quick-admin-chip:hover {
  background: rgba(59, 130, 246, 0.22);
}

.quick-admin-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.quick-card:hover::before,
.quick-card:focus-within::before,
.quick-card.is-active::before {
  opacity: 1;
}

.quick-card-surface {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.quick-card-link {
  position: relative;
  display: grid;
  gap: 16px;
  justify-items: center;
  text-decoration: none;
  color: var(--text-color);
}

.quick-card-art {
  position: relative;
  width: clamp(88px, 20vw, 110px);
  aspect-ratio: 1;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.38), rgba(45, 212, 191, 0.32));
  box-shadow: 0 26px 38px rgba(37, 99, 235, 0.22);
  animation: bubbleFloat 6s ease-in-out infinite;
}

.quick-card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.48), transparent 56%);
  opacity: 0.6;
  pointer-events: none;
}

.quick-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.quick-icon-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: clamp(2rem, 6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(15, 23, 42, 0.78);
  text-transform: uppercase;
}

.quick-label {
  font-size: 1.08rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.02em;
}

.quick-card-popup {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 14px);
  transform: translate(-50%, 12px) scale(0.96);
  width: clamp(220px, 120%, 360px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.26s ease, transform 0.26s ease;
  z-index: 40;
}

.quick-card-popup::before {
  content: "";
  position: absolute;
  inset: -22px;
  background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.45), transparent 65%),
              radial-gradient(circle at 70% 60%, rgba(236, 72, 153, 0.42), transparent 70%);
  filter: blur(34px);
  opacity: 0.8;
  z-index: -2;
}

.quick-card-popup-inner {
  position: relative;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
  box-shadow: 0 24px 48px rgba(37, 99, 235, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}

.quick-card-popup-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 12%, rgba(59, 130, 246, 0.18), transparent 60%),
              radial-gradient(circle at 82% 88%, rgba(16, 185, 129, 0.16), transparent 65%);
  opacity: 0.85;
  pointer-events: none;
}

.quick-card-popup-block {
  position: relative;
  z-index: 1;
}

.quick-card-popup-block + .quick-card-popup-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
}

.quick-card-summary {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(71, 85, 105, 0.92);
}

.quick-card-popup-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-popup-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(30, 41, 59, 0.9);
  text-decoration: none;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(45, 212, 191, 0.2));
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 16px 32px rgba(59, 130, 246, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-popup-chip:hover,
.quick-popup-chip:focus-visible {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 22px 40px rgba(37, 99, 235, 0.25);
}

.quick-card:hover .quick-card-popup,
.quick-card:focus-within .quick-card-popup,
.quick-card.is-active .quick-card-popup {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -10px) scale(1);
}

@media (max-width: 680px) {
  .quick-card-popup {
    width: min(320px, calc(100vw - 48px));
  }
}

@media (hover: none) {
  .quick-card-popup {
    position: static;
    width: 100%;
    margin-top: 12px;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .quick-card-popup::before {
    display: none;
  }

  .quick-card-popup-inner {
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
  }
}

.friend-links {
  text-align: center;
  font-size: 0.95rem;
  color: var(--meta-text-color);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.friend-links a {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 600;
}

.friend-links a:hover {
  text-decoration: underline;
}

[data-theme="dark"] .home-hero {
  background: radial-gradient(circle at 15% -20%, rgba(37, 99, 235, 0.45), transparent 62%),
              radial-gradient(circle at 80% 120%, rgba(236, 72, 153, 0.42), transparent 65%),
              rgba(15, 23, 42, 0.82);
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 38px 70px rgba(2, 6, 23, 0.55);
}

[data-theme="dark"] .home-hero p {
  color: rgba(226, 232, 240, 0.72);
}

[data-theme="dark"] .home-search {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.82));
  border-color: rgba(100, 116, 139, 0.45);
  box-shadow: 0 26px 48px rgba(2, 6, 23, 0.65);
}

[data-theme="dark"] .home-search-icon {
  background: rgba(59, 130, 246, 0.22);
  color: rgba(191, 219, 254, 0.85);
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.5);
}

[data-theme="dark"] .quick-card {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(71, 85, 105, 0.5);
  box-shadow: 0 30px 60px rgba(2, 6, 23, 0.6);
}

[data-theme="dark"] .quick-card::before {
  background: radial-gradient(circle at 18% 20%, rgba(79, 70, 229, 0.32), transparent 60%),
              radial-gradient(circle at 78% 84%, rgba(236, 72, 153, 0.28), transparent 65%);
}

[data-theme="dark"] .quick-card-art {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.55), rgba(8, 145, 178, 0.48));
  box-shadow: 0 28px 40px rgba(15, 23, 42, 0.55);
}

[data-theme="dark"] .quick-icon-fallback {
  color: rgba(226, 232, 240, 0.9);
}

[data-theme="dark"] .quick-card-popup::before {
  background: radial-gradient(circle at 24% 18%, rgba(129, 140, 248, 0.4), transparent 65%),
              radial-gradient(circle at 74% 70%, rgba(248, 113, 113, 0.32), transparent 70%);
  opacity: 0.9;
}

[data-theme="dark"] .quick-card-popup-inner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border-color: rgba(71, 85, 105, 0.6);
  box-shadow: 0 28px 52px rgba(2, 6, 23, 0.65);
}

[data-theme="dark"] .quick-card-popup-inner::after {
  background: radial-gradient(circle at 20% 16%, rgba(129, 140, 248, 0.24), transparent 55%),
              radial-gradient(circle at 78% 86%, rgba(45, 212, 191, 0.22), transparent 60%);
}

[data-theme="dark"] .quick-card-summary {
  color: rgba(226, 232, 240, 0.9);
}

[data-theme="dark"] .quick-popup-chip {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(14, 165, 233, 0.26));
  border-color: rgba(148, 163, 184, 0.45);
  color: rgba(226, 232, 240, 0.92);
  box-shadow: 0 26px 40px rgba(2, 6, 23, 0.55);
}

[data-theme="dark"] .quick-admin-item {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(71, 85, 105, 0.45);
  box-shadow: 0 28px 52px rgba(2, 6, 23, 0.6);
}

[data-theme="dark"] .quick-admin-sub {
  color: rgba(148, 163, 184, 0.7);
}

[data-theme="dark"] .quick-admin-url {
  color: rgba(148, 163, 184, 0.75);
}

[data-theme="dark"] .quick-admin-note {
  color: rgba(203, 213, 225, 0.82);
}

[data-theme="dark"] .quick-admin-chip {
  background: rgba(59, 130, 246, 0.24);
  color: rgba(226, 232, 240, 0.9);
}

[data-theme="dark"] .friend-links {
  color: rgba(226, 232, 240, 0.75);
}

[data-theme="dark"] .friend-links a {
  color: rgba(147, 197, 253, 0.88);
}

/* 内容区域避免被导航栏遮挡 */
main.container {
  margin: 0 auto;
  width: min(100%, 1180px);
  padding: clamp(120px, 16vw, 168px) clamp(20px, 6vw, 72px) 64px;
  box-sizing: border-box;
}

@media (max-width: 720px) {
  .home-shell {
    gap: clamp(20px, 6vw, 28px);
  }

  .home-hero {
    padding: clamp(20px, 8vw, 32px);
    border-radius: 20px;
  }

  .home-hero .home-search {
    margin-top: clamp(14px, 4vw, 22px);
  }

  .home-search {
    max-width: 100%;
    padding: 16px 18px;
    border-radius: 18px;
    gap: 10px;
  }

  .home-search form {
    justify-content: center;
  }

  .home-search input[type="text"] {
    text-align: center;
    font-size: 0.96rem;
  }

  .quick-grid {
    gap: clamp(14px, 4.2vw, 20px);
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .quick-card {
    padding: clamp(18px, 6vw, 24px);
    border-radius: 20px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  }

  .quick-card-popup {
    position: static;
    width: 100%;
    margin-top: 12px;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .quick-card-popup::before {
    display: none;
  }

  .quick-card-popup-inner {
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
  }

  .friend-links {
    font-size: 0.9rem;
    gap: 6px;
  }

  main.container {
    padding: clamp(100px, 18vw, 132px) clamp(18px, 6vw, 32px) 48px;
  }
}

/* 手机及其他窄屏幕适配 */
@media (max-width: 720px) {
  .global-header {
    padding: 12px clamp(12px, 4vw, 20px);
  }

  .glass-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px 18px;
  }

  .nav-links {
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
  }

  .nav-actions {
    justify-content: center;
  }

  .nav-action {
    width: 42px;
    height: 42px;
  }

  .brand-logo {
    height: 36px;
    width: 36px;
  }

  main.container {
    padding: clamp(128px, 20vw, 176px) 20px 48px;
    width: 100%;
  }
}

/* -------------------------------------------------------
 * 共享页面布局与现代卡片设计
 * ----------------------------------------------------- */
.page-shell {
  width: min(100%, 1160px);
  margin: 0 auto;
  display: grid;
  gap: clamp(24px, 5vw, 40px);
}

.page-hero-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 5vw, 48px);
  padding: clamp(28px, 6vw, 48px);
  border-radius: 32px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(135deg, rgba(148, 163, 255, 0.28), rgba(96, 165, 250, 0.22));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 28px 60px rgba(59, 130, 246, 0.18);
  overflow: hidden;
}

.page-hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.32), transparent 58%);
  pointer-events: none;
}

.page-hero-main {
  position: relative;
  display: grid;
  gap: clamp(10px, 1.8vw, 18px);
  z-index: 1;
}

.hero-badge {
  justify-self: start;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: rgba(59, 130, 246, 0.18);
  color: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(147, 197, 253, 0.38);
}

.hero-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.18;
  color: var(--text-color);
}

.hero-subtitle {
  margin: 0;
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  color: rgba(15, 23, 42, 0.66);
}

.page-hero-aside {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  justify-items: end;
}

.hero-stats {
  display: grid;
  gap: 8px;
  text-align: right;
  color: rgba(15, 23, 42, 0.64);
}

.hero-stats strong {
  display: block;
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  color: var(--text-color);
}

.card-panel {
  position: relative;
  padding: clamp(22px, 4vw, 32px);
  border-radius: 24px;
  background: var(--card-bg-color);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.card-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(16px, 2vw, 24px);
}

.card-panel-title {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--text-color);
}

.card-panel-subtitle {
  margin: 0;
  color: var(--meta-text-color);
  font-size: 0.95rem;
}

.card-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.card-collection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(16px, 3vw, 24px);
}

.card-tile {
  position: relative;
  display: grid;
  gap: 12px;
  padding: clamp(18px, 3vw, 24px);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 36px rgba(148, 163, 184, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(59, 130, 246, 0.18);
}

.quick-link-item {
  overflow: visible;
}

.link-hover-card {
  position: absolute;
  top: calc(100% + 12px);
  right: 18px;
  width: min(320px, 80vw);
  padding: 16px clamp(16px, 3vw, 20px);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.82));
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 12;
}

.quick-link-item:hover .link-hover-card,
.quick-link-item:focus-within .link-hover-card {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.link-summary-text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-color);
  line-height: 1.5;
}

.link-summary-text.muted {
  color: var(--meta-text-color);
}

.link-sub-links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-sub-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  color: rgba(30, 41, 59, 0.85);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.link-sub-chip:hover {
  background: rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}

[data-theme="dark"] .link-hover-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.88));
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 24px 44px rgba(2, 6, 23, 0.6);
}

[data-theme="dark"] .link-summary-text {
  color: #e2e8f0;
}

[data-theme="dark"] .link-summary-text.muted {
  color: rgba(148, 163, 184, 0.78);
}

[data-theme="dark"] .link-sub-chip {
  background: rgba(96, 165, 250, 0.16);
  color: rgba(226, 232, 240, 0.92);
}

[data-theme="dark"] .link-sub-chip:hover {
  background: rgba(37, 99, 235, 0.32);
}

@media (max-width: 720px) {
  .quick-admin-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .quick-admin-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .link-hover-card {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    margin-top: 12px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

}

.tile-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
}

.tile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--meta-text-color);
}

.tile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.tile-body {
  display: grid;
  gap: 6px;
}

.tile-body .tile-meta {
  font-size: 0.85rem;
  color: var(--meta-text-color);
  word-break: break-all;
}

.icon-tile {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.icon-avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(14, 165, 233, 0.22));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.4);
}

.icon-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.card-collection.stack {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card-collection.compact {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.form-card {
  display: grid;
  gap: clamp(20px, 3vw, 28px);
}

.form-stack {
  display: grid;
  gap: clamp(16px, 3vw, 24px);
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-group.inline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-group small {
  color: var(--meta-text-color);
  font-size: 0.85rem;
}

.form-control,
.textarea-field,
.input-field {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-color);
  padding: 12px 18px;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-sizing: border-box;
}

.form-control:focus,
.textarea-field:focus,
.input-field:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.68);
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.32);
  transform: translateY(-1px);
}

.select-field {
  width: 100%;
  appearance: none;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(241, 245, 249, 0.68));
  color: var(--text-color);
  padding: 12px 48px 12px 18px;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-sizing: border-box;
}

.select-field:hover {
  border-color: rgba(59, 130, 246, 0.48);
}

.select-field:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.68);
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.32);
  transform: translateY(-1px);
}

.select-wrap {
  position: relative;
  display: grid;
}

.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 10px;
  height: 10px;
  border: solid rgba(100, 116, 139, 0.72);
  border-width: 0 2px 2px 0;
  transform: translateY(-60%) rotate(45deg);
  pointer-events: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.select-wrap:focus-within::after {
  border-color: rgba(37, 99, 235, 0.75);
  transform: translateY(-50%) rotate(45deg);
}

.type-picker {
  display: grid;
  gap: 10px;
}

.type-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.type-chip {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.68));
  border-radius: 18px;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
  align-items: flex-start;
  justify-items: flex-start;
  cursor: pointer;
  color: var(--text-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.type-chip:hover {
  border-color: rgba(59, 130, 246, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.15);
}

.type-chip.is-active {
  border-color: rgba(59, 130, 246, 0.68);
  box-shadow: 0 14px 28px rgba(59, 130, 246, 0.18);
  background: linear-gradient(145deg, rgba(219, 234, 254, 0.95), rgba(191, 219, 254, 0.8));
  transform: translateY(-3px);
}

.type-chip:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.85);
  outline-offset: 2px;
}

.type-chip-label {
  font-size: 0.95rem;
  font-weight: 600;
}

.type-chip-key {
  font-size: 0.78rem;
  color: rgba(71, 85, 105, 0.85);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

[data-theme="dark"] .type-chip {
  border-color: rgba(148, 163, 184, 0.24);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.85), rgba(30, 41, 59, 0.65));
  color: #f1f5f9;
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.55);
}

[data-theme="dark"] .type-chip:hover {
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.32);
}

[data-theme="dark"] .type-chip.is-active {
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.95), rgba(59, 130, 246, 0.82));
  box-shadow: 0 16px 32px rgba(30, 64, 175, 0.32);
}

[data-theme="dark"] .type-chip-key {
  color: rgba(148, 163, 184, 0.85);
}

.child-links {
  display: grid;
  gap: 12px;
}

.child-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) auto;
  gap: 10px;
  align-items: center;
}

.child-link-row .icon-btn {
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
}

@media (max-width: 640px) {
  .child-link-row {
    grid-template-columns: 1fr;
  }

  .child-link-row .icon-btn {
    justify-self: flex-end;
  }
}

.form-control-file,
.input-file {
  padding: 12px;
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.6);
  background: rgba(255, 255, 255, 0.65);
  color: var(--meta-text-color);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-control-file:hover,
.input-file:hover {
  border-color: rgba(59, 130, 246, 0.65);
  background: rgba(147, 197, 253, 0.12);
  color: rgba(15, 23, 42, 0.7);
}

.form-divider {
  height: 1px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.32);
}

.form-divider.emphasis {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.45), rgba(147, 197, 253, 0.25));
}

.checkbox-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 48px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(241, 245, 249, 0.68));
  border: 1px solid rgba(148, 163, 184, 0.34);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
  min-width: 0;
}

.checkbox-chip:hover {
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 16px 30px rgba(59, 130, 246, 0.18);
  transform: translateY(-1px);
}

.checkbox-chip:active {
  transform: scale(0.98);
}

.checkbox-chip input[type="checkbox"] {
  appearance: none;
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(226, 232, 240, 0.7));
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
}

.checkbox-chip input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  transform: scale(0);
  transition: transform 0.18s ease;
}

.checkbox-chip input[type="checkbox"]:checked {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 12px 20px rgba(37, 99, 235, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.checkbox-chip input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.checkbox-chip input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.28), 0 12px 20px rgba(37, 99, 235, 0.22);
}

.checkbox-chip span {
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.92rem;
  min-width: 0;
}

.form-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.34);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-switch:hover {
  border-color: rgba(59, 130, 246, 0.68);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.18);
}

.form-switch input[type="checkbox"] {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(226, 232, 240, 0.65));
  display: grid;
  place-items: center;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.form-switch input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  transform: scale(0);
  transition: transform 0.18s ease;
}

.form-switch input[type="checkbox"]:checked {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.form-switch input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.form-switch input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.28), 0 10px 18px rgba(37, 99, 235, 0.22);
}

.form-switch span {
  font-weight: 600;
  color: var(--text-color);
}

[data-theme="dark"] .form-switch {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(100, 116, 139, 0.35);
}

[data-theme="dark"] .form-switch input[type="checkbox"] {
  border-color: rgba(100, 116, 139, 0.45);
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.72));
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .form-switch input[type="checkbox"]:checked {
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .form-switch span {
  color: rgba(226, 232, 240, 0.88);
}


[data-theme="dark"] .select-field {
  background: rgba(15, 23, 42, 0.76);
  border-color: rgba(100, 116, 139, 0.45);
  color: rgba(226, 232, 240, 0.88);
}

[data-theme="dark"] .select-field:hover {
  border-color: rgba(129, 140, 248, 0.6);
}

[data-theme="dark"] .select-wrap::after {
  border-color: rgba(148, 163, 184, 0.7);
}

[data-theme="dark"] .select-wrap:focus-within::after {
  border-color: rgba(96, 165, 250, 0.85);
}

[data-theme="dark"] .element-index {
  color: rgba(226, 232, 240, 0.82);
  background: rgba(71, 85, 105, 0.42);
}

[data-theme="dark"] .element-type-badge {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.26), rgba(14, 165, 233, 0.24));
  color: rgba(226, 232, 240, 0.92);
}

[data-theme="dark"] .element-preview {
  color: rgba(148, 163, 184, 0.72);
}

[data-theme="dark"] .element-preview.muted {
  color: rgba(100, 116, 139, 0.68);
}

[data-theme="dark"] .icon-btn {
  background: rgba(59, 130, 246, 0.14);
  color: rgba(226, 232, 240, 0.92);
}

[data-theme="dark"] .icon-btn:hover {
  background: rgba(59, 130, 246, 0.22);
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.28);
}

[data-theme="dark"] .icon-btn.ghost {
  background: rgba(71, 85, 105, 0.32);
  color: rgba(226, 232, 240, 0.78);
}

[data-theme="dark"] .icon-btn.ghost:hover {
  background: rgba(71, 85, 105, 0.4);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.38);
}

[data-theme="dark"] .icon-btn.danger {
  background: rgba(248, 113, 113, 0.16);
  color: rgba(252, 165, 165, 0.95);
}

[data-theme="dark"] .icon-btn.danger:hover {
  background: rgba(248, 113, 113, 0.2);
  box-shadow: 0 12px 22px rgba(248, 113, 113, 0.28);
  color: rgba(254, 202, 202, 0.98);
}
.pill-btn {
  --pill-bg-start: #2563eb;
  --pill-bg-end: #1d4ed8;
  --pill-border: rgba(37, 99, 235, 0.45);
  --pill-color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--pill-bg-start), var(--pill-bg-end));
  color: var(--pill-color);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 34px rgba(37, 99, 235, 0.32);
}

.pill-btn:active {
  transform: translateY(0);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28);
}

.pill-btn.ghost {
  background: transparent;
  border: 1px solid var(--pill-border);
  color: var(--pill-bg-start);
  box-shadow: none;
}

.pill-btn.ghost:hover {
  background: rgba(37, 99, 235, 0.12);
}

.pill-btn.sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.pill-btn.accent-sky {
  --pill-bg-start: #2563eb;
  --pill-bg-end: #1d4ed8;
  --pill-border: rgba(37, 99, 235, 0.45);
}

.pill-btn.accent-teal {
  --pill-bg-start: #0ea5e9;
  --pill-bg-end: #0f766e;
  --pill-border: rgba(14, 165, 233, 0.45);
}

.pill-btn.accent-rose {
  --pill-bg-start: #ff2442;
  --pill-bg-end: #ff7a85;
  --pill-border: rgba(255, 99, 132, 0.45);
}

.pill-btn.neutral {
  --pill-bg-start: #475569;
  --pill-bg-end: #1f2937;
  --pill-border: rgba(148, 163, 184, 0.45);
}


.textarea-field {
  min-height: 200px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.form-footer .align-left {
  margin-right: auto;
}

.form-footer > .glass-btn:only-child,
.form-footer > a.glass-btn:only-child {
  width: 100%;
  flex: 1 1 auto;
  min-height: 48px;
  justify-content: center;
  border-radius: 20px;
  box-sizing: border-box;
}

.glass-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, 0.4);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.82), rgba(14, 165, 233, 0.74));
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 18px 35px rgba(59, 130, 246, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.glass-btn::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.22), transparent 58%);
  opacity: 0.7;
  pointer-events: none;
}

.glass-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 46px rgba(37, 99, 235, 0.33);
}

.glass-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 18px 28px rgba(37, 99, 235, 0.25);
}

.glass-btn.small {
  padding: 8px 18px;
  font-size: 0.9rem;
}

.glass-btn.compact {
  padding: 10px 20px;
  border-radius: 20px;
}

.glass-btn.accent-sky {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(14, 165, 233, 0.82));
  border-color: rgba(147, 197, 253, 0.55);
  box-shadow: 0 20px 38px rgba(59, 130, 246, 0.32);
}

.glass-btn.accent-sky::after {
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.32), transparent 65%);
}

.glass-btn.ghost {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-color);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.1);
}

.glass-btn.ghost::after {
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.4), transparent 65%);
}

.glass-btn.ghost:hover {
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.18);
}

.glass-btn.alt {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.85), rgba(5, 150, 105, 0.78));
  box-shadow: 0 18px 36px rgba(16, 185, 129, 0.26);
}

.glass-btn.danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.88), rgba(248, 113, 113, 0.82));
  box-shadow: 0 18px 38px rgba(248, 113, 113, 0.32);
}

.glass-btn.neutral {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.6), rgba(203, 213, 225, 0.45));
  color: rgba(30, 41, 59, 0.9);
  box-shadow: 0 16px 32px rgba(148, 163, 184, 0.24);
}

.input-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(147, 197, 253, 0.32);
  font-size: 0.85rem;
  color: var(--meta-text-color);
}

.filter-control {
  width: min(360px, 100%);
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-color);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-control:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.68);
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.28);
}

.action-form {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.file-trigger {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.file-trigger input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.inline-form {
  display: contents;
}

.checkbox-chip.compact {
  padding: 10px 16px 10px 44px;
  border-radius: 14px;
  font-size: 0.85rem;
}

.media-review {
  display: grid;
  gap: clamp(20px, 3vw, 28px);
}

.media-review h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: var(--text-color);
}

.media-review-grid {
  display: grid;
  gap: clamp(14px, 2.4vw, 22px);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.media-preview {
  padding: clamp(16px, 3vw, 22px);
  display: grid;
  gap: 12px;
  align-content: start;
}

.media-preview img,
.media-preview video {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  max-height: 260px;
}

.media-preview audio {
  width: 100%;
}

.media-preview .checkbox-chip {
  justify-self: start;
}

.media-preview .remote-url {
  font-size: 0.85rem;
  word-break: break-all;
  color: var(--link-color);
}

.editor-field {
  min-height: clamp(320px, 45vh, 520px);
  font-family: "Fira Code", "JetBrains Mono", Consolas, "Courier New", monospace;
}

.empty-hint-card {
  padding: clamp(24px, 4vw, 32px);
  border-radius: 20px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px dashed rgba(59, 130, 246, 0.35);
  text-align: center;
  color: var(--meta-text-color);
}

.form-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(24px, 6vh, 48px) clamp(16px, 6vw, 60px);
  background: rgba(15, 23, 42, 0.55);
  z-index: 1500;
  overflow-y: auto;
}

.form-overlay.show {
  display: flex;
}

.overlay-card {
  width: min(640px, 92vw);
  max-height: min(92vh, 720px);
  border-radius: 24px;
  padding: clamp(26px, 4vw, 36px);
  background: var(--card-bg-color);
  color: var(--text-color);
  box-shadow: 0 28px 56px rgba(15, 23, 42, 0.35);
  text-align: left;
  font-size: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.table-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.chip-muted {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--meta-text-color);
  font-size: 0.8rem;
}

.card-tile .chip-muted {
  justify-self: start;
}

.card-tile a {
  color: inherit;
  text-decoration: none;
}

.card-tile a:hover {
  text-decoration: underline;
}

.card-tile strong {
  color: var(--text-color);
}

.page-shell .empty-hint {
  text-align: center;
  color: var(--meta-text-color);
  margin: 0;
}

.card-panel.danger {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.18), rgba(252, 165, 165, 0.14));
  border-color: rgba(248, 113, 113, 0.35);
  box-shadow: 0 26px 44px rgba(248, 113, 113, 0.22);
}

.card-panel.danger .card-panel-title {
  color: #b91c1c;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.tag-success {
  background: rgba(34, 197, 94, 0.2);
  color: #15803d;
}

.tag-muted {
  background: rgba(148, 163, 184, 0.24);
  color: rgba(71, 85, 105, 0.75);
}

/* -------------------------------------------------------
 * 文章详情布局与 Markdown 展示
 * ----------------------------------------------------- */
.article-shell {
  width: min(100%, 1080px);
  margin: 0 auto;
  display: grid;
  gap: clamp(24px, 5vw, 36px);
}

.article-meta-card {
  display: grid;
  gap: clamp(14px, 3vw, 20px);
}

.article-meta-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.article-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(59, 130, 246, 0.14);
  color: rgba(37, 99, 235, 0.85);
}

.article-meta-primary {
  font-size: 0.95rem;
  color: var(--meta-text-color);
}

.article-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(14px, 3vw, 20px);
}

.meta-chip {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(147, 197, 253, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.meta-chip .meta-key {
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: rgba(37, 99, 235, 0.9);
  text-transform: uppercase;
}

.meta-chip .meta-value {
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-word;
}

.article-content {
  display: grid;
  gap: clamp(18px, 3vw, 28px);
}

.markdown-body {
  display: grid;
  gap: 1.2rem;
  color: var(--text-color);
  line-height: 1.75;
  font-size: 1rem;
}

.markdown-body > * {
  margin: 0;
}

.markdown-body code {
  background: var(--inline-code-bg, rgba(27, 31, 35, 0.05));
  color: var(--inline-code-color, #c7254e);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.95em;
}

.markdown-body pre {
  background: var(--code-block-bg, #f6f8fa);
  border: 1px solid var(--card-border-color, #e1e4e8);
  border-radius: 12px;
  padding: clamp(16px, 3vw, 20px);
  overflow: auto;
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.95em;
  line-height: 1.6;
}

.markdown-body .codehilite,
.markdown-body .highlight {
  position: relative;
}

.markdown-body .codehilite pre,
.markdown-body .highlight pre {
  margin: 0;
}

.markdown-body blockquote {
  border-left: 4px solid var(--link-color, #3366cc);
  background: var(--blockquote-bg, rgba(52, 58, 64, 0.05));
  color: var(--blockquote-color, #6a737d);
  padding: 16px 22px;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.article-hero-card {
  margin-bottom: 20px;
  display: grid;
  gap: 12px;
  padding: clamp(20px, 4vw, 28px);
}

.article-hero-title {
  margin: 0;
  font-size: clamp(2rem, 1.2rem + 1.6vw, 2.6rem);
  font-weight: 700;
  color: var(--text-color);
}

.article-hero-subtitle {
  margin: 0;
  max-width: 720px;
  color: var(--meta-text-color);
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-footer-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: clamp(24px, 5vw, 36px) auto 0;
}

.article-action-link,
.article-action-btn {
  appearance: none;
  border: none;
  outline: none;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.article-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgb(37, 99, 235);
  background: rgba(37, 99, 235, 0.12);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.16);
}

.article-action-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.18);
  background: rgba(37, 99, 235, 0.18);
}

.article-action-btn {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.85), rgba(14, 165, 233, 0.85));
  color: #fff;
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.28);
}

.article-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 36px rgba(14, 165, 233, 0.32);
}

.article-action-btn.is-success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.86), rgba(16, 185, 129, 0.86));
  box-shadow: 0 18px 32px rgba(16, 185, 129, 0.28);
}

.article-action-btn.is-error {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.9), rgba(239, 68, 68, 0.9));
  box-shadow: 0 18px 32px rgba(239, 68, 68, 0.28);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin-top: 2em;
  margin-bottom: 0.8em;
  line-height: 1.3;
  color: var(--heading-color, #24292e);
  scroll-margin-top: 96px;
}

.markdown-body h1 {
  font-size: clamp(2.3rem, 5vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  padding-bottom: 0.6em;
  position: relative;
}

.markdown-body h1::before,
.markdown-body h1::after {
  content: "";
  position: absolute;
  height: 2px;
  width: min(240px, 40%);
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.25), rgba(14, 165, 233, 0.45));
}

.markdown-body h1::before {
  top: -12px;
}

.markdown-body h1::after {
  bottom: 0;
}

.markdown-body h2 {
  font-size: clamp(1.8rem, 4vw, 2.1rem);
  font-weight: 600;
  padding-bottom: 0.35em;
  border-bottom: 3px solid rgba(59, 130, 246, 0.45);
}

.markdown-body h3 {
  font-size: clamp(1.4rem, 3vw, 1.6rem);
  font-weight: 600;
  padding-left: 0.85em;
  position: relative;
}

.markdown-body h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  height: 0.85em;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.8), rgba(14, 165, 233, 0.8));
}

.markdown-body h4 {
  font-size: clamp(1.2rem, 3vw, 1.3rem);
  font-weight: 600;
  opacity: 0.85;
}

.markdown-body h5 {
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.75;
}

.markdown-body h6 {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.65;
}

.markdown-body img {
  display: block;
  margin: 1.4rem auto;
  width: min(100%, 640px);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: zoom-in;
}

.markdown-body img:hover {
  transform: scale(1.015);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.markdown-body video,
.markdown-body audio {
  display: block;
  width: min(100%, 760px);
  margin: 2rem auto;
  background: var(--card-bg-color);
  border: 1px solid var(--card-border-color);
  border-radius: 16px;
  padding: 0.75rem;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.markdown-body table thead {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.16), rgba(14, 165, 233, 0.12));
}

.markdown-body th,
.markdown-body td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  text-align: left;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.4rem;
  display: grid;
  gap: 0.6rem;
}

.markdown-body li {
  line-height: 1.6;
}

.fullscreen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  z-index: 1200;
}

.fullscreen-overlay img {
  max-width: 92%;
  max-height: 82vh;
  border-radius: 18px;
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.45);
  cursor: zoom-out;
}

.fullscreen-overlay span {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  text-align: center;
}

#toc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  z-index: 1180;
}

#toc-modal {
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 420px);
  background: var(--card-bg-color);
  border: 1px solid var(--card-border-color);
  border-radius: 20px;
  box-shadow: 0 28px 56px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  display: none;
  z-index: 1190;
}

#toc-modal-header {
  padding: 0.85rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(59, 130, 246, 0.12);
}

#toc-modal-header h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-color);
}

#toc-close-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-color);
  cursor: pointer;
  transition: transform 0.2s ease;
}

#toc-close-btn:hover {
  transform: scale(1.1);
}

#toc-modal-body {
  max-height: 70vh;
  overflow-y: auto;
  padding: 1rem 1.2rem;
  display: grid;
  gap: 0.6rem;
}

#toc-modal-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

#toc-modal-body a {
  color: var(--link-color);
  font-size: 0.92rem;
  text-decoration: none;
}

#toc-modal-body a:hover {
  text-decoration: underline;
}

.article-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.markdown-body .task-list-item {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.markdown-body .task-list-item input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}

.content-page {
  display: grid;
  gap: clamp(28px, 5vw, 36px);
  --hero-bg: radial-gradient(circle at top left, rgba(99, 102, 241, 0.16), transparent 45%), linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(13, 148, 136, 0.08));
  --hero-border: rgba(59, 130, 246, 0.18);
  --hero-shadow: 0 30px 60px rgba(37, 99, 235, 0.15);
  --hero-sub: rgba(15, 23, 42, 0.78);
  --hero-glow-bg: radial-gradient(circle, rgba(56, 189, 248, 0.35), transparent 60%);
}

.content-page--edu {
  --hero-bg: radial-gradient(circle at top right, rgba(20, 184, 166, 0.15), transparent 45%), linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(6, 182, 212, 0.16));
  --hero-border: rgba(6, 182, 212, 0.18);
  --hero-shadow: 0 30px 60px rgba(13, 148, 136, 0.18);
  --hero-sub: rgba(15, 23, 42, 0.74);
  --hero-glow-bg: radial-gradient(circle, rgba(125, 211, 252, 0.35), transparent 60%);
}

[data-theme="dark"] .content-page {
  --hero-bg: radial-gradient(circle at top left, rgba(99, 102, 241, 0.26), transparent 45%),
                linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(13, 148, 136, 0.18));
  --hero-border: rgba(59, 130, 246, 0.28);
  --hero-shadow: 0 32px 64px rgba(2, 6, 23, 0.6);
}

[data-theme="dark"] .content-page--edu {
  --hero-bg: radial-gradient(circle at top right, rgba(20, 184, 166, 0.28), transparent 45%),
                linear-gradient(135deg, rgba(6, 182, 212, 0.28), rgba(8, 145, 178, 0.22));
  --hero-border: rgba(6, 182, 212, 0.3);
  --hero-shadow: 0 32px 64px rgba(6, 182, 212, 0.25);
}


.content-hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: clamp(24px, 6vw, 40px);
  background: var(--hero-bg);
  border: 1px solid var(--hero-border);
  box-shadow: var(--hero-shadow);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 32px);
}

.hero-headline {
  max-width: 640px;
}

.content-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--hero-title, #0f172a);
}

.content-hero p {
  margin: 12px 0 0;
  max-width: 640px;
  color: var(--hero-sub);
  font-size: 1rem;
  line-height: 1.6;
}

.hero-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.hero-action {
  margin: 0;
  display: inline-flex;
}

.hero-glow {
  position: absolute;
  top: -40%;
  right: -10%;
  width: 360px;
  height: 360px;
  background: var(--hero-glow-bg);
  filter: blur(12px);
  pointer-events: none;
}

.content-page--edu .hero-glow {
  top: -30%;
  right: auto;
  left: -10%;
  width: 320px;
  height: 320px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.content-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.content-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 30px 60px rgba(30, 64, 175, 0.18);
}

.content-card:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.8);
  outline-offset: 4px;
}

.content-card__media {
  position: relative;
  padding-top: 56%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(108%);
}

.content-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30, 58, 138, 0), rgba(15, 23, 42, 0.3));
}

.content-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.content-card__body {
  display: grid;
  gap: 12px;
  padding: 18px 20px 22px;
}

.content-card__meta {
  color: rgba(15, 23, 42, 0.65);
  font-size: 0.85rem;
}

.content-card__meta-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.content-card__title {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-color);
}

.content-card__summary {
  margin: 0;
  font-size: 0.95rem;
  color: var(--meta-text-color);
  line-height: 1.6;
}

.content-card__tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: rgba(59, 130, 246, 0.78);
}

.content-card__tags li {
  list-style: none;
}

@media (max-width: 720px) {
  .content-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .hero-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
  }
}

.content-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.95rem;
}

.content-pagination a,
.content-pagination span {
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--meta-text-color);
}

.content-pagination a:hover {
  background: rgba(59, 130, 246, 0.12);
  color: var(--text-color);
}

.content-pagination .current {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.82), rgba(14, 165, 233, 0.74));
  color: #fff;
}

.content-pagination .disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.editor-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  display: grid;
  gap: clamp(24px, 5vw, 36px);
}

.editor-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.editor-hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.2rem);
}

.editor-hero p {
  margin: 4px 0 0;
  color: var(--meta-text-color);
}

.editor-subtitle {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: var(--meta-text-color);
}

.editor-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.editor-form {
  display: grid;
  gap: clamp(20px, 4vw, 28px);
}

.section-heading {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
}

.elements-stack {
  display: grid;
  gap: 18px;
}

.control-group {
  display: grid;
  gap: 8px;
}

.control-group label {
  font-weight: 600;
  color: var(--text-color);
}

.element-card {
  background: var(--card-bg-color);
  border: 1px solid var(--card-border-color);
  border-radius: 20px;
  padding: clamp(16px, 4vw, 24px);
  box-shadow: 0 20px 35px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 16px;
}

.element-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.element-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 220px;
}

.element-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.72);
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  padding: 4px 10px;
  letter-spacing: 0.02em;
}

.element-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(14, 165, 233, 0.2));
  color: rgba(15, 23, 42, 0.85);
  letter-spacing: 0.01em;
}

.element-preview {
  flex: 1;
  min-width: 140px;
  font-size: 0.88rem;
  color: var(--meta-text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.element-preview.muted {
  font-style: italic;
  color: rgba(148, 163, 184, 0.8);
}

.element-fields {
  display: grid;
  gap: 14px;
}

.select-row {
  align-items: center;
  gap: 10px;
}

.select-row label {
  font-size: 0.9rem;
  color: var(--meta-text-color);
}

.icon-btn {
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(226, 232, 240, 0.28));
  color: var(--text-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(59, 130, 246, 0.22);
  border-color: rgba(147, 197, 253, 0.55);
}

.icon-btn:active {
  transform: scale(0.96);
}

.icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.28);
}

.icon-btn.ghost {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.25), rgba(203, 213, 225, 0.18));
  border-color: rgba(148, 163, 184, 0.38);
  color: rgba(51, 65, 85, 0.88);
}

.icon-btn.ghost:hover {
  box-shadow: 0 16px 28px rgba(30, 41, 59, 0.18);
  border-color: rgba(148, 163, 184, 0.55);
}

.icon-btn.danger {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.28), rgba(244, 63, 94, 0.18));
  border-color: rgba(248, 113, 113, 0.38);
  color: rgba(190, 18, 60, 0.92);
}

.icon-btn.danger:hover {
  box-shadow: 0 16px 32px rgba(248, 113, 113, 0.28);
  border-color: rgba(248, 113, 113, 0.55);
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

[data-action="collapse"] .icon-chevron {
  transition: transform 0.25s ease;
}

.element-card.is-collapsed .element-body {
  display: none;
}

.element-card.is-collapsed [data-action="collapse"] .icon-chevron {
  transform: rotate(180deg);
}

.element-card.is-highlight {
  animation: cardGlow 0.6s ease;
}

@keyframes cardGlow {
  0% {
    box-shadow: 0 0 0 rgba(59, 130, 246, 0);
  }
  50% {
    box-shadow: 0 18px 32px rgba(59, 130, 246, 0.22);
  }
  100% {
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.08);
  }
}

.element-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

[data-theme="dark"] .element-card {
  box-shadow: 0 26px 52px rgba(2, 6, 23, 0.55);
}

[data-theme="dark"] .icon-btn {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.48));
  border-color: rgba(71, 85, 105, 0.45);
  color: rgba(226, 232, 240, 0.92);
}

[data-theme="dark"] .icon-btn:hover {
  border-color: rgba(148, 163, 184, 0.55);
  box-shadow: 0 18px 32px rgba(30, 41, 59, 0.38);
}

[data-theme="dark"] .icon-btn.ghost {
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.65), rgba(30, 41, 59, 0.38));
  border-color: rgba(71, 85, 105, 0.5);
  color: rgba(226, 232, 240, 0.82);
}

[data-theme="dark"] .icon-btn.danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.28), rgba(153, 27, 27, 0.22));
  border-color: rgba(248, 113, 113, 0.45);
  color: rgba(254, 226, 226, 0.9);
}

.content-empty {
  text-align: center;
  color: var(--meta-text-color);
  font-size: 1rem;
}

[data-theme="dark"] .content-page {
  --hero-title: #e2e8f0;
  --hero-sub: rgba(226, 232, 240, 0.78);
}

[data-theme="dark"] .content-card {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(71, 85, 105, 0.35);
  box-shadow: 0 26px 52px rgba(2, 6, 23, 0.6);
}

[data-theme="dark"] .content-card__meta {
  color: rgba(226, 232, 240, 0.65);
}

[data-theme="dark"] .content-card__summary {
  color: rgba(226, 232, 240, 0.7);
}

[data-theme="dark"] .content-pagination a:hover {
  background: rgba(59, 130, 246, 0.24);
}
.table-card {
  padding: clamp(16px, 3vw, 24px);
  display: grid;
  gap: 18px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.modern-table thead {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.16), rgba(14, 165, 233, 0.12));
}

.modern-table th,
.modern-table td {
  padding: 16px 18px;
  text-align: center;
  color: var(--text-color);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.modern-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.08);
}

.action-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toggle-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(14px, 2.4vw, 22px);
}

.toggle-item {
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.82);
  padding: clamp(16px, 3vw, 24px);
  display: grid;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.toggle-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 44px rgba(15, 23, 42, 0.12);
}

.toggle-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.toggle-head label {
  flex: 1;
  font-weight: 600;
  color: var(--text-color);
}

.toggle-head input[type="checkbox"] {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(226, 232, 240, 0.65));
  display: grid;
  place-items: center;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.toggle-head input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  transform: scale(0);
  transition: transform 0.18s ease;
}

.toggle-head input[type="checkbox"]:checked {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.toggle-head input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.toggle-head input[type="checkbox"]:active {
  transform: scale(0.95);
}

.toggle-head input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.28), 0 10px 18px rgba(37, 99, 235, 0.22);
}

.toggle-note {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-color);
  padding: 12px 16px;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.toggle-note:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.28);
}

.empty-hint-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text-color);
}

.icon-tile .tile-actions {
  justify-self: end;
}

.form-overlay[data-modal="inline"] {
  background: rgba(15, 23, 42, 0.35);
}

[data-theme="dark"] .card-panel.danger {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.24), rgba(239, 68, 68, 0.18));
  border-color: rgba(248, 113, 113, 0.42);
  box-shadow: 0 28px 52px rgba(153, 27, 27, 0.28);
}

[data-theme="dark"] .article-meta-primary {
  color: rgba(226, 232, 240, 0.75);
}

[data-theme="dark"] .article-badge {
  background: rgba(59, 130, 246, 0.22);
  color: rgba(191, 219, 254, 0.82);
}

[data-theme="dark"] .meta-chip {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(96, 165, 250, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .article-action-link {
  background: rgba(59, 130, 246, 0.18);
  color: rgba(191, 219, 254, 0.92);
}

[data-theme="dark"] .article-action-link:hover {
  background: rgba(59, 130, 246, 0.28);
}

[data-theme="dark"] .article-action-btn {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.75), rgba(14, 116, 144, 0.82));
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.45);
}

[data-theme="dark"] .article-action-btn.is-success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.74), rgba(16, 185, 129, 0.78));
}

[data-theme="dark"] .article-action-btn.is-error {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.78), rgba(239, 68, 68, 0.78));
}

[data-theme="dark"] .article-hero-card {
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

[data-theme="dark"] .article-hero-title {
  color: rgba(226, 232, 240, 0.96);
}

[data-theme="dark"] .article-hero-subtitle {
  color: rgba(148, 163, 184, 0.9);
}

[data-theme="dark"] .markdown-body pre {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(30, 41, 59, 0.55);
}

[data-theme="dark"] .markdown-body img {
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] #toc-modal {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(100, 116, 139, 0.35);
}

[data-theme="dark"] #toc-modal-header {
  background: rgba(59, 130, 246, 0.18);
}

[data-theme="dark"] #toc-modal-body a {
  color: rgba(147, 197, 253, 0.85);
}

[data-theme="dark"] .tag-muted {
  background: rgba(71, 85, 105, 0.35);
  color: rgba(226, 232, 240, 0.7);
}

[data-theme="dark"] .table-scroll {
  box-shadow: inset 0 0 0 1px rgba(30, 41, 59, 0.45);
}

[data-theme="dark"] .modern-table thead {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.22), rgba(14, 165, 233, 0.18));
}

[data-theme="dark"] .modern-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.12);
}

[data-theme="dark"] .checkbox-chip {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.76));
  border-color: rgba(71, 85, 105, 0.52);
}

[data-theme="dark"] .checkbox-chip span {
  color: rgba(226, 232, 240, 0.88);
}

[data-theme="dark"] .checkbox-chip:hover {
  border-color: rgba(96, 165, 250, 0.58);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.24);
}

[data-theme="dark"] .checkbox-chip input[type="checkbox"] {
  border-color: rgba(71, 85, 105, 0.65);
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.74));
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .checkbox-chip input[type="checkbox"]:checked {
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .checkbox-chip input[type="checkbox"]:focus-visible {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.28), 0 14px 26px rgba(37, 99, 235, 0.3);
}

[data-theme="dark"] .toggle-item {
  background: rgba(15, 23, 42, 0.68);
  border-color: rgba(100, 116, 139, 0.32);
  box-shadow: 0 24px 52px rgba(2, 6, 23, 0.5);
}

[data-theme="dark"] .toggle-note {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(100, 116, 139, 0.4);
}

[data-theme="dark"] .toggle-head input[type="checkbox"] {
  border-color: rgba(100, 116, 139, 0.55);
  background: linear-gradient(150deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.85));
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .toggle-head input[type="checkbox"]:checked {
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* -------------------------------------------------------
 * 暗色模式适配
 * ----------------------------------------------------- */
[data-theme="dark"] .page-hero-card {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.35), rgba(56, 189, 248, 0.22));
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 28px 60px rgba(17, 24, 39, 0.55);
}

[data-theme="dark"] .glass-nav {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.6));
  border-color: rgba(148, 163, 184, 0.26);
  box-shadow: 0 26px 52px rgba(2, 6, 23, 0.6);
}

[data-theme="dark"] .nav-link {
  color: rgba(226, 232, 240, 0.82);
}

[data-theme="dark"] .nav-action {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(17, 24, 39, 0.72));
  color: rgba(226, 232, 240, 0.88);
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.55);
}



[data-theme="dark"] .nav-action:hover {
  box-shadow: 0 22px 36px rgba(37, 99, 235, 0.38);
}

[data-theme="dark"] .hero-badge {
  background: rgba(59, 130, 246, 0.25);
  color: rgba(226, 232, 240, 0.82);
  border-color: rgba(96, 165, 250, 0.48);
}

[data-theme="dark"] .hero-subtitle {
  color: rgba(226, 232, 240, 0.65);
}

[data-theme="dark"] .card-panel,
[data-theme="dark"] .card-tile {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(100, 116, 139, 0.28);
  box-shadow: 0 30px 60px rgba(2, 6, 23, 0.55);
}

[data-theme="dark"] .card-tile:hover {
  box-shadow: 0 34px 70px rgba(37, 99, 235, 0.38);
}

[data-theme="dark"] .tile-meta,
[data-theme="dark"] .card-panel-subtitle,
[data-theme="dark"] .hero-stats {
  color: rgba(226, 232, 240, 0.7);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .textarea-field,
[data-theme="dark"] .input-field {
  background: rgba(15, 23, 42, 0.76);
  border-color: rgba(100, 116, 139, 0.45);
}

[data-theme="dark"] .form-control-file,
[data-theme="dark"] .input-file {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(100, 116, 139, 0.45);
  color: rgba(226, 232, 240, 0.78);
}

[data-theme="dark"] .checkbox-chip {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(100, 116, 139, 0.42);
}

[data-theme="dark"] .glass-btn.ghost {
  background: rgba(15, 23, 42, 0.45);
  color: rgba(226, 232, 240, 0.9);
  border-color: rgba(100, 116, 139, 0.45);
}

[data-theme="dark"] .glass-btn.ghost:hover {
  box-shadow: 0 26px 46px rgba(2, 6, 23, 0.6);
}

[data-theme="dark"] .chip-muted {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.68);
}

[data-theme="dark"] .empty-hint-card {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(59, 130, 246, 0.4);
  color: rgba(226, 232, 240, 0.75);
}

[data-theme="dark"] .filter-control {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(100, 116, 139, 0.42);
  color: rgba(226, 232, 240, 0.88);
}

[data-theme="dark"] .overlay-card {
  background: rgba(15, 23, 42, 0.82);
  color: rgba(226, 232, 240, 0.9);
}

@media (max-width: 860px) {
  .page-hero-card {
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(24px, 8vw, 36px);
  }

  .page-hero-aside {
    width: 100%;
    justify-items: stretch;
    text-align: left;
  }

  .card-panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .card-panel-actions,
  .tile-actions,
  .form-footer {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .glass-btn {
    width: 100%;
    justify-content: center;
  }
}
