/* 尘箓 RuleHub — GitHub 风格样式（浅色主题） */
:root {
  /* GitHub 浅色色板 */
  --gh-canvas: #ffffff;
  --gh-canvas-subtle: #f6f8fa;
  --gh-border: #d0d7de;
  --gh-border-muted: #d8dee4;
  --gh-fg: #1f2328;
  --gh-fg-muted: #59636e;
  --gh-accent: #0969da;
  --gh-accent-subtle: #ddf4ff;
  --gh-success: #1f883d;
  --gh-success-hover: #1a7f37;
  --gh-success-subtle: #dafbe1;
  --gh-danger: #cf222e;
  --gh-danger-subtle: #ffebe9;
  --gh-attention: #9a6700;
  --gh-attention-subtle: #fff8c5;
  --gh-done: #8250df;
  --gh-done-subtle: #fbefff;
  --gh-neutral-subtle: rgba(175, 184, 193, 0.2);
  --gh-radius: 6px;
  --gh-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
    Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --gh-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* hidden 属性优先：避免 .gh-label-pill / .rh-nav-item 等 display 规则覆盖 UA 的 [hidden]，
   导致「未发布 / 待审核 / 审核管理入口 / 称号标签」等隐藏元素意外常显 */
[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--gh-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--gh-fg);
  background: var(--gh-canvas-subtle);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gh-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ==================== 顶栏 ==================== */
.gh-header {
  background: var(--gh-canvas-subtle);
  border-bottom: 1px solid var(--gh-border);
}

.gh-header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 100%;
  margin: 0 auto;
  padding: 12px 16px;
}

.gh-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gh-fg);
  font-weight: 600;
  font-size: 15px;
}

.gh-brand:hover {
  text-decoration: none;
}

.gh-logo {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  border: 1px solid var(--gh-border);
  background: var(--gh-canvas);
  color: var(--gh-fg);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gh-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.gh-user-name {
  color: var(--gh-fg-muted);
  font-size: 13px;
}

.gh-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gh-neutral-subtle);
  border: 1px solid var(--gh-border);
  color: var(--gh-fg);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gh-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==================== 容器与页头 ==================== */
.gh-container {
  max-width: 1012px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.gh-container-narrow {
  max-width: 640px;
}

.gh-page-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.gh-page-title {
  font-size: 20px;
  font-weight: 600;
}

.gh-page-sub {
  color: var(--gh-fg-muted);
  font-size: 13px;
  margin-bottom: 16px;
}

/* ==================== 卡片与列表 ==================== */
.gh-card {
  background: var(--gh-canvas);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  margin-bottom: 16px;
  overflow: hidden;
}

.gh-card-header {
  padding: 12px 16px;
  background: var(--gh-canvas-subtle);
  border-bottom: 1px solid var(--gh-border);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gh-card-header .gh-header-action {
  margin-left: auto;
}

.gh-list {
  display: block;
}

.gh-list-item {
  display: block;
  width: 100%;
  padding: 16px;
  border: none;
  border-bottom: 1px solid var(--gh-border-muted);
  background: var(--gh-canvas);
  text-align: left;
  color: var(--gh-fg);
  font-size: 14px;
}

.gh-list-item:last-child {
  border-bottom: none;
}

a.gh-list-item {
  color: var(--gh-fg);
}

a.gh-list-item:hover,
button.gh-list-item:hover {
  background: var(--gh-canvas-subtle);
  text-decoration: none;
}

.gh-item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gh-item-title {
  color: var(--gh-accent);
  font-size: 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.gh-item-desc {
  margin-top: 4px;
  color: var(--gh-fg-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.gh-item-meta {
  margin-top: 8px;
  color: var(--gh-fg-muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gh-item-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==================== 徽章 ==================== */
.gh-label-pill {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  border: 1px solid var(--gh-border);
  background: var(--gh-neutral-subtle);
  color: var(--gh-fg-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.gh-label-open {
  background: var(--gh-success-subtle);
  border-color: transparent;
  color: var(--gh-success);
}

.gh-label-closed {
  background: var(--gh-danger-subtle);
  border-color: transparent;
  color: var(--gh-danger);
}

.gh-label-warn {
  background: var(--gh-attention-subtle);
  border-color: transparent;
  color: var(--gh-attention);
}

.gh-label-done {
  background: var(--gh-done-subtle);
  border-color: transparent;
  color: var(--gh-done);
}

/* 名称右侧标签（合作单位，2026-10-12）：蓝色圆角小标签 + 白字 */
.gh-label-tag {
  background: var(--gh-accent);
  border-color: transparent;
  color: #fff;
}

/* ==================== 首页原创内容统计（搜索框上方，2026-10-13） ==================== */
.rh-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}

.rh-stats-total {
  font-size: 13px;
  color: var(--gh-fg-muted);
}

.rh-stats-cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.rh-stats-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border: 1px solid var(--gh-border);
  border-radius: 999px;
  background: var(--gh-canvas);
  color: var(--gh-fg-muted);
  font-size: 12px;
  line-height: 1.7;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.rh-stats-cat b {
  color: var(--gh-accent);
  font-weight: 600;
}

.rh-stats-cat:hover {
  background: var(--gh-accent-subtle);
  border-color: var(--gh-accent);
  color: var(--gh-accent);
  text-decoration: none;
}

/* ==================== 内容仓库标签（2026-10-13） ====================
   · 列表展示：.rh-tag-row（卡片内一行，span 容器）
   · 投稿 / 仓库设置：.rh-tag-editor（已选标签 + 输入框 + 添加按钮 + 已有标签建议） */
.rh-tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.rh-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border: 1px solid var(--gh-border);
  border-radius: 999px;
  background: var(--gh-canvas);
  color: var(--gh-fg-muted);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.7;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.rh-tag-chip:hover {
  background: var(--gh-accent-subtle);
  border-color: var(--gh-accent);
  color: var(--gh-accent);
  text-decoration: none;
}

.rh-tag-editor {
  position: relative;      /* 承载建议下拉的绝对定位 */
  margin-top: 2px;
}

.rh-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.rh-tag-input-row {
  display: flex;
  gap: 8px;
}

/* 输入时的「已有标签」建议下拉（投稿 / 编辑页，2026-10-13） */
.rh-tag-suggest {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  margin-top: 4px;
  max-height: 232px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--gh-border);
  border-radius: 8px;
  background: var(--gh-canvas);
  box-shadow: 0 6px 18px rgba(31, 35, 40, .12);
}

.rh-tag-suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--gh-fg);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.rh-tag-suggest-item:hover {
  background: var(--gh-accent-subtle);
  color: var(--gh-accent);
}

.rh-tag-suggest-count {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--gh-fg-muted);
}

/* 常驻「已有标签」候选：点击直接加入 */
.rh-tag-hot-wrap {
  margin-top: 8px;
}

.rh-tag-hot-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11.5px;
  color: var(--gh-fg-muted);
}

.rh-tag-hot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rh-tag-pick {
  padding: 1px 9px;
  border: 1px dashed var(--gh-border);
  border-radius: 999px;
  background: transparent;
  color: var(--gh-fg-muted);
  font-size: 11.5px;
  line-height: 1.7;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.rh-tag-pick:hover {
  border-style: solid;
  border-color: var(--gh-accent);
  background: var(--gh-accent-subtle);
  color: var(--gh-accent);
}

.rh-tag-input-row .gh-input {
  flex: 1 1 auto;
  min-width: 0;
}

.rh-tag-del {
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.rh-tag-del:hover {
  color: var(--gh-danger);
}

/* 标签编辑仅出现在「仓库设置 → 基本信息」（2026-10-13）：
   其余芯片样式（.rh-tag-chip / .rh-tag-del / .rh-tag-row）在列表页与设置页共用。 */

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 16px;
  border-radius: var(--gh-radius);
  border: 1px solid var(--gh-border);
  background: var(--gh-canvas);
  color: var(--gh-fg);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
}

.btn:hover {
  background: var(--gh-canvas-subtle);
  text-decoration: none;
}

.btn:disabled {
  opacity: .6;
  cursor: default;
}

.btn-primary {
  background: var(--gh-success);
  border-color: rgba(31, 136, 61, 0.4);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--gh-success-hover);
}

.btn-danger {
  color: var(--gh-danger);
}

.btn-danger:hover {
  background: var(--gh-danger-subtle);
  border-color: rgba(207, 34, 46, 0.4);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 3px 12px;
  font-size: 12px;
}

/* ==================== 表单 ==================== */
.gh-field {
  display: block;
  margin-bottom: 16px;
}

.gh-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}

.gh-label .gh-required {
  color: var(--gh-danger);
}

.gh-input,
.gh-textarea {
  display: block;
  width: 100%;
  padding: 5px 12px;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  background: var(--gh-canvas);
  color: var(--gh-fg);
  font-size: 14px;
  font-family: inherit;
  line-height: 20px;
  outline: none;
}

.gh-input {
  height: 32px;
}

.gh-textarea {
  min-height: 96px;
  padding: 8px 12px;
  resize: vertical;
}

.gh-input:focus,
.gh-textarea:focus {
  border-color: var(--gh-accent);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.3);
}

input[type="file"].gh-input {
  height: auto;
  padding: 6px 10px;
  background: var(--gh-canvas-subtle);
  border-style: dashed;
}

.gh-hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--gh-fg-muted);
}

.gh-error-text {
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid rgba(207, 34, 46, 0.4);
  border-radius: var(--gh-radius);
  background: var(--gh-danger-subtle);
  color: var(--gh-danger);
  font-size: 13px;
}

/* ==================== 空白态 ==================== */
.gh-blank {
  padding: 40px 16px;
  text-align: center;
  color: var(--gh-fg-muted);
}

.gh-blank-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gh-fg);
  margin-bottom: 6px;
}

/* ==================== 认证页（登录/注册） ==================== */
.gh-auth-body {
  background: var(--gh-canvas-subtle);
}

.gh-auth-wrap {
  max-width: 340px;
  margin: 0 auto;
  padding: 48px 16px;
}

.gh-auth-logo {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 1px solid var(--gh-border);
  background: var(--gh-canvas);
  color: var(--gh-fg);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Logo 图片（圆形边框容器内铺满显示） */
.gh-logo img,
.gh-auth-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gh-auth-title {
  text-align: center;
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 20px;
}

.gh-auth-card {
  padding: 20px;
  margin-bottom: 16px;
}

.gh-auth-alt {
  padding: 16px;
  text-align: center;
  font-size: 14px;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  background: var(--gh-canvas);
}

/* ==================== Toast ==================== */
.gh-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(8px);
  max-width: 80vw;
  padding: 10px 18px;
  border-radius: var(--gh-radius);
  background: var(--gh-fg);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 99;
}

.gh-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.gh-toast-error {
  background: var(--gh-danger);
}

/* ==================== 工具 ==================== */
.gh-muted {
  color: var(--gh-fg-muted);
}

.gh-mono {
  font-family: var(--gh-font-mono);
  font-size: 12px;
}

.gh-body-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
  font-size: 14px;
}

.gh-divider {
  height: 1px;
  background: var(--gh-border-muted);
  margin: 16px 0;
}

/* ==================== 分类筛选（Phase 4） ==================== */
.gh-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.gh-filter {
  padding: 5px 12px;
  border: 1px solid var(--gh-border);
  border-radius: 999px;
  background: var(--gh-canvas);
  color: var(--gh-fg);
  font-size: 13px;
  line-height: 18px;
}

.gh-filter:hover {
  background: var(--gh-canvas-subtle);
}

.gh-filter.active {
  background: var(--gh-accent);
  border-color: var(--gh-accent);
  color: #fff;
}

/* 下拉选择（投稿栏目 / 分类） */
select.gh-input {
  height: 32px;
  padding: 0 8px;
}

/* ==================== 弹窗（审核拒绝等） ==================== */
.gh-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(31, 35, 40, 0.5);
}

.gh-modal {
  width: 100%;
  max-width: 420px;
  padding: 16px;
  background: var(--gh-canvas);
  border: 1px solid var(--gh-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(140, 149, 159, 0.2);
}

.gh-modal-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.gh-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

/* ---------- 高弹窗（合作单位编辑，2026-10-12）：标题/按钮固定，中间内容区滚动 ----------
   原实现弹窗整体无高度约束，字段多时底部「取消/保存」被顶出视口且无法滚动到；
   改为 flex 纵向布局：容器限高（视口 - 上下边距），标题与按钮 flex:0 0 auto 常显，
   内容区 flex:1 + min-height:0 + overflow-y:auto —— min-height:0 必须写，
   否则 flex 子项默认 min-height:auto 撑高容器，滚动条不会出现。 */
.gh-modal.gh-modal-scroll {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
}

.gh-modal-scroll .gh-modal-title {
  flex: 0 0 auto;
  margin-bottom: 0;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--gh-border-muted);
}

.gh-modal-scroll .gh-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 0;
}

.gh-modal-scroll .gh-modal-actions {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--gh-border-muted);
  background: var(--gh-canvas);
}

/* 窄屏：上下留边更少，尽量把可视高度让给内容区 */
@media (max-width: 480px) {
  .gh-modal.gh-modal-scroll {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }
}

/* ==================== 加载态 / 错误态（Phase 6） ==================== */
.gh-spinner {
  width: 22px;
  height: 22px;
  margin: 0 auto 10px;
  border: 2px solid var(--gh-border);
  border-top-color: var(--gh-accent);
  border-radius: 50%;
  animation: gh-spin .8s linear infinite;
}

@keyframes gh-spin {
  to {
    transform: rotate(360deg);
  }
}

/* 列表项描述最多两行（保持列表整齐） */
.gh-list-item .gh-item-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 键盘可达性 */
.btn:focus-visible,
.gh-filter:focus-visible,
.gh-list-item:focus-visible {
  outline: 2px solid var(--gh-accent);
  outline-offset: 1px;
}

/* iOS 安全区 */
body {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.gh-toast {
  bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}

/* ==================== 移动端适配（≤480px） ==================== */
@media (max-width: 480px) {
  .gh-header-inner {
    gap: 8px;
    padding: 10px 12px;
  }

  .gh-user-name {
    display: none;
  }

  .gh-header-right {
    gap: 6px;
  }

  .gh-header-right .btn {
    padding: 3px 8px;
    font-size: 12px;
  }

  .gh-brand span:last-child {
    font-size: 14px;
  }

  .gh-container {
    padding: 16px 12px 56px;
  }

  .gh-page-title {
    font-size: 18px;
  }

  .gh-page-head {
    gap: 8px;
  }

  .gh-filter {
    padding: 4px 10px;
    font-size: 12px;
  }

  .gh-modal {
    max-height: 80vh;
    overflow-y: auto;
  }
}

/* ==================== 主页（GitHub 式全宽顶栏 + 左侧滑出面板） ==================== */
/* GitHub 顶栏为全宽布局：左（☰ + logo + 标题）贴页面最左、右（头像 + 称号）贴最右，仅保留 16px 边距 */
.gh-header-inner.rh-wide {
  max-width: 100%;
}

/* 顶栏图标按钮（侧边栏开关） */
.rh-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: var(--gh-radius);
  background: transparent;
  color: var(--gh-fg);
}

.rh-icon-btn:hover {
  background: var(--gh-neutral-subtle);
}

/* ==================== 首页左侧常驻板块：合作单位 ====================
   · 卡片高度随描述文字自适应（min-height: --rh-partner-item-h 兜底），同屏槽位与视窗高度由 JS 实测决定
   · 超过同屏槽位时轨道内放两份列表，位移 -50% = 一份列表高度 → 第 6 个衔接第 5 个、无断裂
   · 抽屉打开时让位（与 .rh-drawer 同在左侧，避免叠压） */
.rh-partner-rail {
  --rh-partner-item-h: 164px;
  --rh-partner-cover-size: 46px;      /* 圆形封面直径：白边、压背景图 1/3、标签宽度都以它换算 */
  --rh-partner-gap: 8px;
  --rh-partner-dur: 30s;
  --rh-partner-slots: 5;
  position: fixed;
  left: 24px;
  top: 84px;
  z-index: 20;
  width: 268px;
  padding: 12px 12px 14px;
  background: var(--gh-canvas);
  border: 1px solid var(--gh-border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(31, 35, 40, .08);
  transition: opacity .2s ease;
}

body.sb-open .rh-partner-rail {
  opacity: 0;
  pointer-events: none;
}

.rh-partner-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--gh-fg);
  font-size: 13px;
  font-weight: 600;
}

.rh-partner-head svg {
  color: var(--gh-fg-muted);
}

/* 视窗：高度由 JS 按前 N 张卡片实测高度内联设置（下方 calc 仅为脚本未生效时的兜底）
   + 上下隐藏溢出（滚动时上下各渐隐 8px） */
.rh-partner-viewport {
  height: calc(var(--rh-partner-item-h) * var(--rh-partner-slots)
    + var(--rh-partner-gap) * (var(--rh-partner-slots) - 1));
  overflow: hidden;
}

.rh-partner-viewport.is-scrolling {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 8px, #000 calc(100% - 8px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 8px, #000 calc(100% - 8px), transparent 100%);
}

.rh-partner-list {
  display: flex;
  flex-direction: column;
  gap: var(--rh-partner-gap);
}

.rh-partner-track {
  will-change: transform;
}

/* 动画挂在轨道上、由视窗的 is-scrolling 驱动（JS 只给视窗加类，轨道是它的后代） */
.rh-partner-viewport.is-scrolling .rh-partner-track {
  animation: rh-partner-scroll var(--rh-partner-dur) linear infinite;
}

/* 悬停暂停，方便看清/点击 */
.rh-partner-viewport.is-scrolling:hover .rh-partner-track {
  animation-play-state: paused;
}

@keyframes rh-partner-scroll {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rh-partner-viewport.is-scrolling .rh-partner-track {
    animation: none;
  }
}

/* 卡片：三段式 —— ① 顶部长矩形背景图 ② 中部圆形封面 + 名称/联系方式 ③ 下方描述
   高度随描述文字自适应（min-height 兜底基础高度）；循环滚动仍靠「两份等高列表 + 位移 -50%」
   无缝衔接 —— 同一份列表克隆两份，单份高度变化不影响衔接精度。 */
.rh-partner-item {
  display: flex;
  flex-direction: column;
  min-height: var(--rh-partner-item-h);
  background: var(--gh-canvas-subtle);
  border: 1px solid var(--gh-border-muted);
  border-radius: 12px;
  overflow: hidden;
}

/* ① 顶部背景图：无图 / 加载失败时用默认渐变（固定高度，卡片高度只由描述文字决定） */
.rh-partner-banner {
  position: relative;
  flex: 0 0 62px;
  height: 62px;
  background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 55%, #ffe4e6 100%);
}

.rh-partner-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rh-partner-banner.is-blank::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 18% 50%, rgba(255, 255, 255, .55) 0 6px, transparent 7px),
    radial-gradient(circle at 82% 34%, rgba(255, 255, 255, .4) 0 4px, transparent 5px),
    radial-gradient(circle at 68% 72%, rgba(255, 255, 255, .35) 0 5px, transparent 6px);
}

/* ② 中部：左圆形封面（压在背景图下缘，QQ 群头像样式；蓝色标签钉在封面底部）+ 右名称与联系方式
   封面绝对定位：top 取「负的 1/3 直径」→ 只让上 1/3 压住背景图；左侧用 padding-left 让出封面位。
   min-height 按「封面露出部分 + 标签高度」留位，保证封面与标签不越出本行、不压到下方描述。 */
.rh-partner-row {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(var(--rh-partner-cover-size) * 2 / 3 + 8px);
  padding: 0 10px 4px calc(10px + var(--rh-partner-cover-size) + 10px);
}

.rh-partner-cover {
  position: absolute;
  left: 10px;
  top: calc(-1 * var(--rh-partner-cover-size) / 3);   /* 上 1/3 覆盖背景图 */
  z-index: 1;                                        /* 背景图图层置于头像下方 */
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--rh-partner-cover-size);
  height: var(--rh-partner-cover-size);
  background: var(--gh-accent-subtle);
  color: var(--gh-accent);
  border-radius: 50%;                 /* 与 QQ 群头像一致：圆形显示 */
  box-shadow: 0 0 0 2px #fff;         /* 白色描边：把封面与背景图区分开 */
  font-size: 18px;
  font-weight: 600;
}

/* 圆形裁剪放在 img 上（而不是封面容器）：容器不裁剪，底部标签才不会被 overflow:hidden 切掉 */
.rh-partner-cover img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.rh-partner-body {
  flex: 1;
  min-width: 0;
}

/* 名称行：仅名称（蓝色标签已移至封面底部）；min-width:0 让名称过长时以省略号收尾 */
.rh-partner-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.rh-partner-name {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 蓝色单位标签：钉在封面图底部，只压住封面下缘约 1/4（其余露在封面外）；
   宽度限制为「封面直径 + 18px」，居中对齐封面 —— 不会横向压到右侧名称；
   过长时自身省略号（完整内容由 JS 写入 title） */
.rh-partner-tag {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  max-width: calc(var(--rh-partner-cover-size) + 18px);
  padding: 1px 7px;
  overflow: hidden;
  background: var(--gh-accent);
  color: #fff;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rh-partner-contact {
  margin-top: 2px;
  font-size: 13px;                    /* 联系方式字号加大（原 11px 偏小、不易辨认） */
  line-height: 1.3;
  color: var(--gh-fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ③ 下方描述：单独成区，不截断 —— 高度随文字数量自适应（原先固定两行会让长描述不可见） */
.rh-partner-desc {
  margin-top: 2px;
  padding: 0 10px 8px;
  overflow-wrap: anywhere;            /* 超长无空格串（链接等）强制换行，不撑破卡片 */
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--gh-fg-muted);
}

/* ④ 访问链接（2026-10-12）：填写了链接地址才渲染的「前往访问」按钮（描述下方，左对齐） */
.rh-partner-visit {
  align-self: flex-start;
  margin: 2px 10px 10px;
  padding: 3px 10px;
  border: 1px solid var(--gh-border);
  border-radius: 999px;
  background: var(--gh-accent-subtle);
  color: var(--gh-accent);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.rh-partner-visit:hover {
  background: var(--gh-accent);
  border-color: var(--gh-accent);
  color: #fff;
  text-decoration: none;
}

/* 窄屏（移动优先）放不下左侧常驻板块，整体隐藏 */
@media (max-width: 1180px) {
  .rh-partner-rail {
    display: none;
  }
}

/* 矮屏（笔记本 / 分屏）：基础高度调小、缩小背景图与头像，保证 5 个能排下 */
@media (max-height: 900px) {
  .rh-partner-rail {
    --rh-partner-item-h: 152px;
    --rh-partner-cover-size: 42px;
    top: 72px;
  }

  .rh-partner-banner {
    flex-basis: 52px;
    height: 52px;
  }
}

/* ---------- 审核管理页：圆形封面裁剪器 ---------- */
.rh-crop-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0 10px;
}

#crop-canvas {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;                 /* 触屏拖动不触发页面滚动 */
  background: #1f2328;
}

#crop-canvas:active {
  cursor: grabbing;
}

.rh-crop-zoom {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--gh-fg-muted);
}

.rh-crop-zoom input[type="range"] {
  flex: 1;
  min-width: 0;
}

.rh-crop-tip {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--gh-fg-muted);
}

/* 审核管理页：合作单位对象下的「说明 + 新增按钮」行 */
.rh-partner-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* 主区域（页面主体：标语 + 搜索框，居中） */
.rh-main {
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 57px);
  padding: 10vh 16px 64px;
}

.rh-hero {
  width: 100%;
  max-width: 720px;
  text-align: center;
}

.rh-slogan {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 18px;
  color: var(--gh-fg);
}

/* 页脚平台入口（2026-10-11 美化版）：位于首页主区内容下方（.rh-main 自身撑满首屏，页脚自然落到内容之后），
   不影响主区内容展示；四个入口为「图标 + 标题 + 副标题」卡片，底部固定预留备案号位置 */
.rh-footer {
  width: 100%;
  padding: 30px 16px calc(30px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--gh-border-muted);
}

.rh-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  max-width: 920px;
  margin: 0 auto;
}

/* 单个入口卡片：默认白底细边，hover 上浮 + 强调色描边与投影 */
.rh-footer-item {
  --rh-foot-accent: var(--gh-accent);
  --rh-foot-tint: var(--gh-accent-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 196px;
  max-width: 260px;
  min-width: 150px;
  padding: 13px 15px;
  background: var(--gh-canvas);
  border: 1px solid var(--gh-border);
  border-radius: 12px;
  color: var(--gh-fg);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(27, 31, 36, 0.04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

/* 图标块：柔和底色 + 语义描边色 */
.rh-footer-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--rh-foot-tint);
  color: var(--rh-foot-accent);
  transition: background-color .18s ease, color .18s ease;
}

.rh-footer-item-icon svg {
  display: block;
  width: 22px;
  height: 22px;
}

.rh-footer-item-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rh-footer-item-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}

.rh-footer-item-sub {
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--gh-fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rh-footer-item:hover,
.rh-footer-item:focus-visible {
  transform: translateY(-2px);
  border-color: var(--rh-foot-accent);
  box-shadow: 0 6px 18px rgba(27, 31, 36, 0.10);
  text-decoration: none;
}

.rh-footer-item:hover .rh-footer-item-icon,
.rh-footer-item:focus-visible .rh-footer-item-icon {
  background: var(--rh-foot-accent);
  color: #ffffff;
}

.rh-footer-item:focus-visible {
  outline: 2px solid var(--gh-accent);
  outline-offset: 2px;
}

/* 各入口主题色：复用 GitHub 语义色板，确保与全站配色一致 */
.rh-footer-item--web {
  --rh-foot-accent: #0969da;
  --rh-foot-tint: #ddf4ff;
}

.rh-footer-item--admin {
  --rh-foot-accent: #8250df;
  --rh-foot-tint: #fbefff;
}

.rh-footer-item--rpg {
  --rh-foot-accent: #1f883d;
  --rh-foot-tint: #dafbe1;
}

.rh-footer-item--app {
  --rh-foot-accent: #9a6700;
  --rh-foot-tint: #fff8c5;
}

/* 备案号预留位：至少留出一行高度 + 与入口卡片的间距 */
.rh-footer-icp {
  min-height: 20px;
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  line-height: 20px;
  color: var(--gh-fg-muted);
}

/* 窄屏：收紧外边距与卡片内边距，保证始终居中不溢出 */
@media (max-width: 480px) {
  .rh-footer {
    padding: 24px 12px calc(26px + env(safe-area-inset-bottom, 0px));
  }

  .rh-footer-links {
    gap: 10px;
  }

  .rh-footer-item {
    flex: 1 1 100%;
    max-width: 340px;
    padding: 11px 13px;
  }
}

.rh-search {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}

.rh-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gh-fg-muted);
  pointer-events: none;
}

.rh-search-input {
  width: 100%;
  height: 46px;
  padding: 0 18px 0 46px;
  border: 1px solid var(--gh-border);
  border-radius: 999px;
  background: var(--gh-canvas);
  color: var(--gh-fg);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  box-shadow: 0 1px 2px rgba(31, 35, 40, .04);
}

.rh-search-input:focus {
  border-color: var(--gh-accent);
  box-shadow: 0 0 0 3px rgba(9, 105, 218, .18);
}

/* 从屏幕最左侧滑出的导航面板（点击顶栏 ☰ 出现；点栏目 → 主区展示对应内容）
   2026-09-19：面板只做导航（不再显示内容预览列表），宽度收窄为导航宽度 */
.rh-drawer {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 300px;
  max-width: 92vw;
  z-index: 60;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 12px;
  background: var(--gh-canvas);
  border-right: 1px solid var(--gh-border);
  box-shadow: 0 0 24px rgba(0, 0, 0, .12);
  transform: translateX(-103%);
  transition: transform .25s ease;
}

body.sb-open .rh-drawer {
  transform: translateX(0);
}

.rh-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 8px;
}

.rh-drawer-title {
  font-size: 14px;
  font-weight: 600;
}

/* GitHub 风格竖向导航（侧边栏：主页 + 内容栏目分区 + 审核入口；非胶囊按钮） */
.rh-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.rh-nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rh-nav-section {
  padding: 8px 8px 4px;
  color: var(--gh-fg-muted);
  font-size: 12px;
  font-weight: 600;
}

.rh-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  border-radius: var(--gh-radius);
  background: transparent;
  color: var(--gh-fg);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-align: left;
  text-decoration: none;
}

.rh-nav-item:hover {
  background: var(--gh-neutral-subtle);
  text-decoration: none;
}

.rh-nav-item.active {
  background: var(--gh-neutral-subtle);
  font-weight: 600;
}

.rh-nav-item:focus-visible {
  outline: 2px solid var(--gh-accent);
  outline-offset: 1px;
}

.rh-nav-icon {
  flex: 0 0 16px;
  color: var(--gh-fg-muted);
}

.rh-nav-label {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.rh-nav-item .gh-label-pill {
  margin-left: auto;
}

.rh-nav-divider {
  height: 1px;
  margin: 6px 0;
  background: var(--gh-border-muted);
}

/* 上传来源二选一（文件 / 网页链接） */
.gh-radio-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 2px 0 4px;
}

.gh-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gh-fg);
  cursor: pointer;
}

.gh-radio input[type="radio"] {
  margin: 0;
  cursor: pointer;
}

/* 只读静态值（与 .gh-input 同尺寸的展示块） */
.gh-static-value {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  background: var(--gh-canvas-subtle);
  color: var(--gh-fg-muted);
  font-size: 14px;
}

/* （2026-09-19 移除 .rh-drawer-body：面板不再显示内容预览列表） */

/* 个人中心（头像 + 称号 → 下拉菜单） */
.rh-user {
  position: relative;
}

.rh-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 6px 3px 8px;
  border: 1px solid var(--gh-border);
  border-radius: 999px;
  background: var(--gh-canvas);
}

.rh-user-btn:hover {
  background: var(--gh-canvas-subtle);
}

/* 个人菜单（仿 GitHub 用户菜单：头部信息 + 分组功能 + 退出） */
.rh-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 280px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  background: var(--gh-canvas);
  border: 1px solid var(--gh-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(140, 149, 159, .25);
  z-index: 70;
}

.rh-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
}

.rh-menu-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  font-size: 14px;
}

.rh-menu-user {
  min-width: 0;
}

.rh-menu-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rh-menu-user .title-tag {
  margin-top: 2px;
}

.rh-menu-divider {
  height: 1px;
  margin: 6px -8px;
  background: var(--gh-border-muted);
}

.rh-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  border-radius: var(--gh-radius);
  background: transparent;
  color: var(--gh-fg);
  font-size: 14px;
  line-height: 20px;
  text-align: left;
  text-decoration: none;
}

.rh-menu-item:hover {
  background: var(--gh-canvas-subtle);
  text-decoration: none;
}

.rh-menu-icon {
  flex: 0 0 16px;
  color: var(--gh-fg-muted);
}

.rh-menu-meta {
  margin-left: auto;
  color: var(--gh-fg-muted);
  font-size: 12px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rh-menu-item .gh-label-pill {
  margin-left: auto;
}

/* 称号标签（对齐尘箓 App：chat.vue .msg-title —— padding 3px 8px / radius 8px / font-size 11px）
   normal 紫 / permission 绿 / special 黑 / owner 橙红渐变；gold 档 App 未定义样式，此处同样不设专属样式 */
.title-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  background: #e8e8f0;
  color: #667eea;
  white-space: nowrap;
}

.title-tag.owner {
  background: linear-gradient(135deg, #ff4d4f 0%, #ff6a00 100%);
  color: #fff;
}

.title-tag.permission {
  background: #f0fff0;
  color: #52c41a;
}

.title-tag.special {
  background: #1a1a1a;
  color: #ffd700;
}

/* 抽屉遮罩（窄屏） */
.rh-mask {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(31, 35, 40, .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

body.sb-open .rh-mask {
  opacity: 1;
  pointer-events: auto;
}

/* 窄屏细节（内容面板为通用左侧滑出，宽窄屏一致：点击 ☰ 出现） */
@media (max-width: 600px) {
  .rh-main {
    padding: 10vh 12px 48px;
  }

  .rh-slogan {
    font-size: 20px;
    letter-spacing: 1px;
  }

  .rh-search-input {
    height: 42px;
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .title-tag {
    padding: 2px 8px;
    font-size: 11px;
  }
}

/* ==================== 内容仓库（2026-09） ==================== */
/* 主页浏览区：侧边栏点击栏目（或搜索）后在主区展示对应分类内容 */
.rh-browse {
  margin-top: 28px;
  text-align: left;
}

.rh-browse-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.rh-browse-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--gh-fg);
}

.rh-browse-count {
  color: var(--gh-fg-muted);
  font-size: 12px;
}

/* 主区浏览区：搜索框下方的分类标签（共享玩法插件 / 原创分享等有分类的栏目） */
.rh-browse-cats {
  margin: -2px 0 12px;
}

/* 独立列表页（共享玩法插件 / 原创分享）搜索框：分类标签上方 */
.rh-list-search {
  margin-bottom: 12px;
}

/* 主页更新通知（搜索框下方公告区） */
.rh-updates {
  margin-top: 34px;
  text-align: left;
}

.rh-updates-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--gh-fg-muted);
  font-size: 13px;
  font-weight: 600;
}

.rh-updates-head svg {
  color: var(--gh-accent);
}

.rh-updates-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rh-update-item {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  background: var(--gh-canvas);
  color: var(--gh-fg);
  text-align: left;
  box-shadow: 0 1px 2px rgba(31, 35, 40, .04);
}

.rh-update-item:hover {
  background: var(--gh-canvas-subtle);
  border-color: var(--gh-border-muted);
}

.rh-update-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gh-fg);
  overflow-wrap: anywhere;
}

.rh-update-meta {
  margin-top: 4px;
  color: var(--gh-fg-muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==================== 创作者信息（2026-09-19） ==================== */
/* 详情页两栏布局：主内容 + 右侧创作者信息栏 */
.rh-detail-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.rh-detail-main {
  flex: 1;
  min-width: 0;
}

.rh-detail-side {
  flex: 0 0 280px;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 创作者卡片（详情页右栏 / 创作者主页共用） */
.rh-creator-card {
  padding: 16px;
}

.rh-creator-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.rh-creator-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--gh-neutral-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--gh-fg-muted);
  flex: 0 0 44px;
}

.rh-creator-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rh-creator-main {
  min-width: 0;
  flex: 1;
}

.rh-creator-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--gh-fg);
  overflow-wrap: anywhere;
}

.rh-creator-sub {
  color: var(--gh-fg-muted);
  font-size: 12px;
  margin-top: 2px;
}

.rh-creator-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.rh-creator-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--gh-fg-muted);
  padding: 4px 0;
}

.rh-creator-row b {
  color: var(--gh-fg);
  font-weight: 600;
}

.rh-creator-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.rh-creator-actions .btn {
  flex: 1;
  text-align: center;
}

.rh-follow-btn.active {
  color: var(--gh-attention);
  background: var(--gh-attention-subtle);
  border-color: rgba(154, 103, 0, .4);
}

/* 创作组成员列表 */
.rh-member-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--gh-border-muted);
}

.rh-member-item:last-child {
  border-bottom: none;
}

.rh-member-main {
  flex: 1;
  min-width: 0;
}

.rh-member-name {
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.rh-member-meta {
  color: var(--gh-fg-muted);
  font-size: 12px;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* 创作者主页头部 */
.rh-creator-hero {
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.rh-creator-hero .rh-creator-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  font-size: 24px;
}

.rh-creator-hero-main {
  flex: 1;
  min-width: 200px;
}

.rh-creator-hero-name {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rh-creator-stats {
  display: flex;
  gap: 18px;
  margin-top: 10px;
  flex-wrap: wrap;
  color: var(--gh-fg-muted);
  font-size: 13px;
}

.rh-creator-stats b {
  color: var(--gh-fg);
}

@media (max-width: 860px) {
  .rh-detail-layout {
    flex-direction: column;
  }

  .rh-detail-side {
    width: 100%;
    flex: 1 1 auto;
  }
}

/* 仓库展示页头部 */
.rh-repo-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.rh-repo-head-main {
  flex: 1;
  min-width: 0;
}

.rh-repo-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rh-star-btn.active {
  color: var(--gh-attention);
  background: var(--gh-attention-subtle);
  border-color: rgba(154, 103, 0, .4);
}

/* 存储容量卡片 */
.rh-storage-card {
  padding: 16px;
}

.rh-storage-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--gh-neutral-subtle);
  overflow: hidden;
  margin: 10px 0 6px;
}

.rh-storage-bar-fill {
  height: 100%;
  background: var(--gh-success);
  transition: width .3s ease;
}

.rh-storage-bar-fill.warn {
  background: var(--gh-attention);
}

.rh-storage-bar-fill.danger {
  background: var(--gh-danger);
}

.rh-storage-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--gh-fg-muted);
  font-size: 12px;
}

/* 版本列表 */
.rh-version-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gh-border-muted);
}

.rh-version-item:last-child {
  border-bottom: none;
}

.rh-version-ver {
  font-family: var(--gh-font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--gh-fg);
}

.rh-version-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* 创作组组内消息 */
.rh-msg-list {
  display: block;
}

.rh-msg-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gh-border-muted);
}

.rh-msg-item:last-child {
  border-bottom: none;
}

.rh-msg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--gh-fg-muted);
  font-size: 12px;
}

.rh-msg-user {
  color: var(--gh-fg);
  font-weight: 600;
}

.rh-msg-body {
  margin-top: 4px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
}

/* 面板内小节标题与提示 */
.rh-section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px;
}

.rh-sub-card {
  padding: 16px;
}

.rh-tip {
  padding: 12px 16px;
  border: 1px dashed var(--gh-border);
  border-radius: var(--gh-radius);
  background: var(--gh-canvas-subtle);
  color: var(--gh-fg-muted);
  font-size: 13px;
}

.rh-inline-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.rh-inline-form .gh-field {
  margin-bottom: 0;
  flex: 1;
  min-width: 160px;
}

@media (max-width: 600px) {
  .rh-repo-head {
    gap: 10px;
  }

  .rh-repo-actions {
    width: 100%;
  }
}
