:root {
  --brand: #0071e3;
  --brand-dark: #0062c4;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --surface: #f5f5f7;
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--brand);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: #c9ccd1;
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.15rem;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: linear-gradient(180deg, #0a84ff 0%, #0071e3 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 113, 227, 0.28);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #0077ed 0%, #0062c4 100%);
  box-shadow: 0 8px 22px rgba(0, 113, 227, 0.36);
}
.btn-dark {
  background: #1d1d1f;
  color: #fff;
}
.btn-dark:hover {
  background: #000;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  background: var(--surface);
  border-color: rgba(0, 0, 0, 0.14);
}
.btn-light {
  background: var(--surface);
  color: var(--ink);
}
.btn-light:hover {
  background: #ececf0;
}
.btn-danger {
  background: #fff1f2;
  color: #d92738;
  border-color: #ffd7da;
}
.btn-danger:hover {
  background: #ffe4e6;
}
.btn-sm {
  padding: 0.42rem 0.85rem;
  font-size: 13px;
}
.btn-lg {
  padding: 0.85rem 1.9rem;
  font-size: 16px;
}
.btn-block {
  width: 100%;
}

/* ---------- 表单 ---------- */
.input,
.select,
.textarea {
  width: 100%;
  padding: 0.66rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder,
.textarea::placeholder {
  color: #a1a1a6;
}
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}
.textarea {
  resize: vertical;
  line-height: 1.7;
}
/* 导航搜索框：为绝对定位的搜索图标预留左侧空间
   （.input 的 padding 简写会覆盖 Tailwind 的 pl-* 工具类，因此单独定义） */
.nav-search .input {
  padding-left: 2.5rem;
}

/* ---------- 第三方登录按钮 ---------- */
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.oauth-btn i {
  font-size: 15px;
}
.oauth-btn:hover {
  border-color: rgba(0, 0, 0, 0.2);
  background: #fafafa;
}
.oauth-btn:active {
  transform: scale(0.985);
}

/* ---------- 版本下拉 ---------- */
.ver-dd {
  position: relative;
}
.ver-dd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  color: #1d1d1f;
  cursor: pointer;
  list-style: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.ver-dd-trigger::-webkit-details-marker {
  display: none;
}
.ver-dd-trigger:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.ver-dd[open] .ver-dd-trigger {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}
.ver-dd-current {
  font-weight: 600;
}
.ver-dd-caret {
  font-size: 10px;
  transition: transform 0.18s ease;
}
.ver-dd[open] .ver-dd-caret {
  transform: rotate(180deg);
}
.ver-dd-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 60;
  min-width: 180px;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
}
.ver-dd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  color: #424245;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.ver-dd-item:hover {
  background: #f3f8ff;
  color: var(--brand);
}
.ver-dd-item.is-active {
  color: var(--brand);
  font-weight: 600;
}
.ver-dd-item.is-active .ver-dd-name::before {
  content: "\2713";
  margin-right: 5px;
}
.ver-dd-tags {
  display: inline-flex;
  gap: 4px;
}
.ver-dd-badge {
  padding: 1px 6px;
  border-radius: 999px;
  background: #eff7ff;
  color: var(--brand);
  font-size: 10px;
  font-weight: 500;
}
.ver-dd-badge.is-warn {
  background: #fff7e6;
  color: #b45309;
}

/* ---------- 下拉框 ---------- */
.select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0.62rem 2.35rem 0.62rem 0.9rem;
  font-weight: 500;
  color: var(--ink);
  background-color: #fff;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%2386868b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 11px 11px;
  line-height: 1.4;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.select:hover {
  border-color: rgba(0, 0, 0, 0.2);
  background-color: #fafafa;
}
.select:focus {
  background-color: #fff;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%230071e3' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
}
.select option {
  padding: 10px 12px;
  background-color: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
}
.select option:checked {
  background: #eef6ff linear-gradient(0deg, #eef6ff, #eef6ff);
  color: #0062c4;
  font-weight: 600;
}
.select option:disabled {
  color: #c7c7cc;
}
.select::-ms-expand {
  display: none;
}

/* ---------- 自定义下拉弹层 ---------- */
.sel {
  position: relative;
  display: block;
  width: 100%;
}
.sel-native {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.sel-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%2386868b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 11px 11px;
}
.sel-trigger.is-open {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
  background-color: #fff;
}
.sel-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sel-panel {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  display: none;
  min-width: 132px;
  max-height: 288px;
  padding: 6px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.05);
  animation: sel-in 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}
/* 位置由脚本按触发器坐标计算（fixed 定位），这里不再使用 is-up 偏移 */
.sel-panel.is-open {
  display: block;
}
@keyframes sel-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.sel-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 13px;
  color: #424245;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sel-opt.is-active {
  background: rgba(0, 113, 227, 0.08);
  color: #0062c4;
}
.sel-opt.is-selected {
  color: #0062c4;
  font-weight: 600;
}
.sel-opt.is-selected::before {
  content: "\2713";
  font-size: 11px;
  line-height: 1;
  flex: none;
  color: var(--brand);
}
.sel-opt:not(.is-selected)::before {
  content: "";
  flex: none;
  width: 11px;
}
.sel-opt.is-disabled {
  color: #c7c7cc;
  cursor: not-allowed;
}
.sel-opt.is-disabled.is-active {
  background: #f5f5f7;
}
.label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 13px;
  font-weight: 500;
  color: #3a3a3c;
}
.hint {
  margin-top: 0.35rem;
  font-size: 12px;
  color: var(--muted);
}
.checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

/* ---------- 切换开关 ---------- */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}
.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.switch-track {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #d2d2d7;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.switch-track::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.switch input:checked + .switch-track {
  background: var(--brand);
}
.switch input:checked + .switch-track::after {
  transform: translateX(18px);
}
.switch input:focus-visible + .switch-track {
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16);
}
.switch-text {
  font-size: 12.5px;
  font-weight: 500;
  color: #6e6e73;
  transition: color 0.15s ease;
}
.switch input:checked ~ .switch-text {
  color: var(--brand);
}

/* ---------- 密码明文切换 ---------- */
.pwd {
  position: relative;
}
.pwd .input {
  padding-right: 2.9rem;
}
.pwd-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #a1a1a6;
  font-size: 15px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.pwd-toggle:hover {
  color: #1d1d1f;
  background: rgba(0, 0, 0, 0.05);
}
.pwd-toggle.is-on {
  color: var(--brand);
}

/* ---------- 上传弹窗 ---------- */
.upload-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px 20px;
  border: 1.5px dashed rgba(0, 0, 0, 0.14);
  border-radius: 16px;
  background: #fafafa;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.upload-drop:hover,
.upload-drop.is-drag {
  border-color: var(--brand);
  background: #f3f8ff;
}
.upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.upload-thumb {
  position: relative;
  width: 96px;
  height: 68px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: #f5f5f7;
}
.upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.upload-thumb.upload-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  max-width: 100%;
  height: auto;
  padding: 10px 12px;
  font-size: 11px;
  color: #6e6e73;
}
.upload-thumb.upload-file i {
  font-size: 20px;
  color: var(--brand);
}
.upload-thumb.upload-file span {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 图片库选择器 ---------- */
.pick-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 3px;
  border-radius: 12px;
  background: #f5f5f7;
}
.pick-tab {
  flex: 1;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 12px;
  color: #6e6e73;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pick-tab.is-active {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.pick-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.pick-search .input {
  padding: 0.5rem 0.8rem;
  font-size: 13px;
}
.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
}
.pick-cell {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 11px;
  background: #f5f5f7;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pick-cell img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.pick-cell span {
  display: block;
  padding: 4px 6px;
  font-size: 10px;
  color: #6e6e73;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pick-cell:hover {
  border-color: rgba(0, 113, 227, 0.35);
}
.pick-cell.is-picked {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}
.pick-cell.is-picked::after {
  content: "\2713";
  position: absolute;
  right: 6px;
  top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
}
.pick-empty,
.pick-loading {
  padding: 24px 0;
  text-align: center;
  font-size: 12px;
  color: #a1a1a6;
}

/* 历史文件列表 */
.pick-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
}
.pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 1.5px solid transparent;
  border-radius: 11px;
  background: #fafafa;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pick-row i {
  flex-shrink: 0;
  font-size: 17px;
  color: var(--brand);
}
.pick-row-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  color: #1d1d1f;
}
.pick-row-meta {
  flex-shrink: 0;
  font-size: 10.5px;
  font-style: normal;
  color: #a1a1a6;
}
.pick-row:hover {
  border-color: rgba(0, 113, 227, 0.3);
  background: #fff;
}
.pick-row.is-picked {
  border-color: var(--brand);
  background: #f3f8ff;
}
.pick-row.is-picked::after {
  content: "\2713";
  flex-shrink: 0;
  font-size: 12px;
  color: var(--brand);
}

/* ---------- 卡片 ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.card-soft {
  background: var(--surface);
  border-radius: var(--radius);
}

/* ---------- 徽章 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.badge-blue {
  background: #e8f1fd;
  color: #0062c4;
}
.badge-green {
  background: #e7f8ef;
  color: #0a7b45;
}
.badge-gray {
  background: #f0f1f3;
  color: #5c5c61;
}
.badge-amber {
  background: #fff5e6;
  color: #a05a00;
}
.badge-red {
  background: #fff0f1;
  color: #c82536;
}

/* ---------- 导航 ---------- */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: 10px;
  font-size: 14px;
  color: #3a3a3c;
  text-decoration: none;
  transition: all 0.15s ease;
}
.nav-link:hover {
  background: var(--surface);
  color: #000;
}

.admin-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.62rem 0.85rem;
  border-radius: 11px;
  font-size: 14px;
  color: #9aa4b2;
  text-decoration: none;
  transition: all 0.15s ease;
}
.admin-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.admin-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.admin-link i {
  font-size: 16px;
}

/* ---------- 表格 ---------- */
.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table thead th {
  padding: 0.8rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: #fafafa;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f1f2f4;
  vertical-align: middle;
}
.table tbody tr:last-child td {
  border-bottom: none;
}
.table tbody tr:hover {
  background: #fbfbfd;
}
.table .muted {
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- 文章排版 ---------- */
.prose-md {
  font-size: 15px;
  line-height: 1.85;
  color: #333336;
}
.prose-md > *:first-child {
  margin-top: 0;
}
.prose-md h1,
.prose-md h2,
.prose-md h3,
.prose-md h4 {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.4;
  margin: 1.8em 0 0.7em;
}
.prose-md h1 {
  font-size: 26px;
}
.prose-md h2 {
  font-size: 21px;
}
.prose-md h3 {
  font-size: 17px;
}
.prose-md p {
  margin: 0.9em 0;
}
.prose-md ul,
.prose-md ol {
  margin: 0.9em 0;
  padding-left: 1.4em;
}
.prose-md ul {
  list-style: disc;
}
.prose-md ol {
  list-style: decimal;
}
.prose-md li {
  margin: 0.35em 0;
}
.prose-md a {
  color: var(--brand);
  text-decoration: none;
}
.prose-md a:hover {
  text-decoration: underline;
}
.prose-md strong {
  color: var(--ink);
  font-weight: 600;
}
.prose-md blockquote {
  margin: 1.2em 0;
  padding: 0.7em 1.1em;
  border-left: 3px solid var(--brand);
  background: #f4f9ff;
  border-radius: 0 10px 10px 0;
  color: #3a4a5c;
}
.prose-md blockquote p {
  margin: 0.3em 0;
}
.prose-md pre {
  margin: 1.1em 0;
  padding: 1rem 1.15rem;
  background: #0b1220;
  color: #f8f8f2;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
}
.prose-md pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
.prose-md code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
.prose-md :not(pre) > code {
  background: #f2f3f5;
  padding: 0.15em 0.42em;
  border-radius: 6px;
  color: #d6336c;
  font-size: 0.88em;
}

/* ---------- Chroma Monokai 代码高亮 ---------- */
.prose-md .chroma {
  background: #0b1220;
  color: #f8f8f2;
  margin: 1.1em 0;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  -webkit-font-smoothing: antialiased;
  white-space: pre;
}
.prose-md .chroma code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
}
.prose-md .chroma .line {
  display: flex;
}
.prose-md .chroma .cl {
  display: block;
  flex: 1;
}
.prose-md .chroma .w {
  color: #f8f8f2;
}
.prose-md .chroma .err {
  color: #f92672;
  border-bottom: 1px dotted;
}
.prose-md .chroma .k,
.prose-md .chroma .kd,
.prose-md .chroma .kn,
.prose-md .chroma .kp,
.prose-md .chroma .kr,
.prose-md .chroma .kt {
  color: #f92672;
}
.prose-md .chroma .kc {
  color: #66d9ef;
}
.prose-md .chroma .n {
  color: #f8f8f2;
}
.prose-md .chroma .na {
  color: #a6e22e;
}
.prose-md .chroma .nb {
  color: #ae81ff;
}
.prose-md .chroma .bp {
  color: #f8f8f2;
}
.prose-md .chroma .nc,
.prose-md .chroma .nf {
  color: #a6e22e;
}
.prose-md .chroma .nd {
  color: #a6e22e;
  font-weight: bold;
}
.prose-md .chroma .ni {
  color: #ae81ff;
}
.prose-md .chroma .ne {
  color: #f92672;
}
.prose-md .chroma .nl {
  color: #e6db74;
}
.prose-md .chroma .nn {
  color: #f8f8f2;
}
.prose-md .chroma .nx {
  color: #a6e22e;
}
.prose-md .chroma .py {
  color: #f8f8f2;
}
.prose-md .chroma .nv,
.prose-md .chroma .vc,
.prose-md .chroma .vg,
.prose-md .chroma .vi {
  color: #f8f8f2;
}
.prose-md .chroma .no,
.prose-md .chroma .m,
.prose-md .chroma .mi,
.prose-md .chroma .mf,
.prose-md .chroma .mh,
.prose-md .chroma .mb,
.prose-md .chroma .mo {
  color: #ae81ff;
}
.prose-md .chroma .l {
  color: #ae81ff;
}
.prose-md .chroma .ld {
  color: #ae81ff;
}
.prose-md .chroma .s,
.prose-md .chroma .s1,
.prose-md .chroma .s2,
.prose-md .chroma .sb,
.prose-md .chroma .sc,
.prose-md .chroma .sd,
.prose-md .chroma .sh,
.prose-md .chroma .si,
.prose-md .chroma .sx,
.prose-md .chroma .sr,
.prose-md .chroma .ss {
  color: #e6db74;
}
.prose-md .chroma .sa,
.prose-md .chroma .dl {
  color: #e6db74;
}
.prose-md .chroma .se {
  color: #ae81ff;
}
.prose-md .chroma .o,
.prose-md .chroma .ow {
  color: #f92672;
}
.prose-md .chroma .p {
  color: #f8f8f2;
}
.prose-md .chroma .c,
.prose-md .chroma .c1,
.prose-md .chroma .cm {
  color: #75715e;
  font-style: italic;
}
.prose-md .chroma .cp {
  color: #75715e;
  font-weight: bold;
}
.prose-md .chroma .cs {
  color: #75715e;
  font-style: italic;
}
.prose-md .chroma .gd {
  background: #2a0f1a;
  color: #f92672;
}
.prose-md .chroma .ge {
  font-style: italic;
}
.prose-md .chroma .gi {
  background: #173a1f;
  color: #a6e22e;
}
.prose-md .chroma .gr {
  color: #f92672;
}
.prose-md .chroma .gh,
.prose-md .chroma .gu {
  color: #75715e;
  font-weight: bold;
}
.prose-md .chroma .go {
  color: #75715e;
}
.prose-md .chroma .gp {
  color: #a6e22e;
}
.prose-md .chroma .gs {
  font-weight: bold;
}
.prose-md .chroma .gt {
  color: #f92672;
}
.prose-md .chroma .nt {
  color: #f92672;
}
.prose-md table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.1em 0;
  font-size: 13.5px;
}
.prose-md th,
.prose-md td {
  padding: 0.55rem 0.8rem;
  border: 1px solid #e8e9eb;
  text-align: left;
}
.prose-md th {
  background: #fafafa;
  font-weight: 600;
}
.prose-md img {
  max-width: 100%;
  border-radius: 12px;
  margin: 1em 0;
}
.prose-md hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 1.8em 0;
}

.prose-mini {
  font-size: 12.5px;
  line-height: 1.7;
  color: #5c5c61;
}
.prose-mini p {
  margin: 0.25em 0;
}
.prose-mini ul,
.prose-mini ol {
  margin: 0.25em 0;
  padding-left: 1.15em;
  list-style: disc;
}
.prose-mini a {
  color: var(--brand);
}

/* ---------- 其他 ---------- */
.flash {
  animation: flash-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes flash-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fade-up {
  animation: fade-up 0.5s ease both;
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-glow {
  background:
    radial-gradient(60% 50% at 20% 10%, rgba(0, 113, 227, 0.14), transparent 70%),
    radial-gradient(50% 50% at 85% 20%, rgba(94, 92, 230, 0.12), transparent 70%),
    radial-gradient(60% 60% at 50% 100%, rgba(48, 209, 88, 0.08), transparent 70%);
}

.cover-fallback {
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(255, 255, 255, 0.5), transparent 60%),
    linear-gradient(135deg, #dbeafe 0%, #ede9fe 55%, #fce7f3 100%);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.scrollbar-none {
  scrollbar-width: none;
}
.scrollbar-none::-webkit-scrollbar {
  display: none;
}

.cover-thumb {
  width: 52px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
  background: linear-gradient(135deg, #e0e7ff, #fce7f3);
}

.sidebar-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

/* ---------- 版本图集轮播 ---------- */
.gallery-slide {
  border: 0;
  padding: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.gallery-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  font-size: 18px;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.gallery-nav:hover {
  background: rgba(0, 0, 0, 0.55);
}
[data-gallery-dot] {
  width: 6px;
  height: 6px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all 0.2s ease;
}
[data-gallery-dot].is-active {
  width: 18px;
  background: #fff;
}
.gallery-thumb {
  width: 74px;
  height: 50px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #f5f5f7;
  opacity: 0.62;
  cursor: pointer;
  transition: all 0.18s ease;
}
.gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumb:hover {
  opacity: 1;
}
.gallery-thumb.is-active {
  opacity: 1;
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25);
}

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.is-open {
  display: flex;
  animation: modal-fade 0.18s ease;
}
@keyframes modal-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.42);
  backdrop-filter: blur(6px);
}
.modal-panel {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  animation: modal-rise 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes modal-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.modal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: #6e6e73;
  cursor: pointer;
  transition: all 0.15s ease;
}
.modal-close:hover {
  background: #e8e8ed;
  color: #1d1d1f;
}
.modal-body {
  padding: 18px 22px;
}
.modal-foot {
  display: flex;
  gap: 10px;
  padding: 14px 22px 20px;
}
.modal-foot .btn {
  flex: 1;
}

/* ---------- 全屏灯箱轮播 ---------- */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 14, 0.94);
  backdrop-filter: blur(14px);
}
.gallery-lightbox.is-open {
  display: flex;
  animation: lb-in 0.2s ease;
}
@keyframes lb-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.lb-stage {
  margin: 0;
  max-width: 92vw;
  text-align: center;
}
.lb-stage img {
  max-width: 92vw;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.lb-stage figcaption {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.62);
}
.lb-btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.lb-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lb-close {
  top: 22px;
  right: 22px;
  font-size: 18px;
}
.lb-prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}
.lb-next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}
@media (max-width: 640px) {
  .lb-prev {
    left: 10px;
  }
  .lb-next {
    right: 10px;
  }
  .lb-btn {
    width: 40px;
    height: 40px;
  }
  .lb-stage img {
    max-height: 76vh;
  }
}

/* ---------- 图标无限滚动 ---------- */
.icon-marquee {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.marquee-row {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  padding: 12px;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-left 30s linear infinite;
  will-change: transform;
}
.marquee-row.is-right .marquee-track {
  animation-name: marquee-right;
}
.marquee-row:hover .marquee-track {
  animation-play-state: paused;
}
@keyframes marquee-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
@keyframes marquee-right {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}
.marquee-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin-right: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.marquee-item:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}
.marquee-item i {
  font-size: 25px;
  color: rgba(255, 255, 255, 0.72);
}
.marquee-item img {
  max-width: 34px;
  max-height: 34px;
  object-fit: contain;
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
}