/* ==========================================================================
   工单区 · GitHub Issue 复刻
   独立的 .gh 命名空间，不依赖也不污染项目皮肤（skin.css）。
   色值取 GitHub Primer 亮/暗两套；结构、间距、圆角、图标均照 GitHub。
   ========================================================================== */

.gh{
  --gh-canvas:#ffffff;
  --gh-canvas-subtle:#f6f8fa;
  --gh-canvas-inset:#f6f8fa;
  --gh-border:#d0d7de;
  --gh-border-muted:#d8dee4;
  --gh-fg:#1f2328;
  --gh-fg-muted:#656d76;
  --gh-fg-subtle:#6e7781;
  --gh-accent:#0969da;
  --gh-accent-subtle:rgba(9,105,218,.1);
  --gh-open-fg:#1a7f37;
  --gh-open-emphasis:#1f883d;
  --gh-open-subtle:#dafbe1;
  --gh-done-fg:#8250df;
  --gh-done-emphasis:#8250df;
  --gh-done-subtle:#fbefff;
  --gh-danger-fg:#d1242f;
  --gh-danger-emphasis:#cf222e;
  --gh-danger-subtle:#ffebe9;
  --gh-btn-bg:#f6f8fa;
  --gh-btn-border:rgba(31,35,40,.15);
  --gh-btn-hover:#eef1f4;
  --gh-btn-shadow:0 1px 0 rgba(31,35,40,.04);
  --gh-neutral:rgba(175,184,193,.2);
  --gh-counter-bg:rgba(175,184,193,.2);
  --gh-font:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  --gh-mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;

  font-family:var(--gh-font);
  font-size:14px;
  line-height:1.5;
  color:var(--gh-fg);
  -webkit-font-smoothing:antialiased;
}
html[data-theme="dark"] .gh{
  --gh-canvas:#0d1117;
  --gh-canvas-subtle:#161b22;
  --gh-canvas-inset:#010409;
  --gh-border:#30363d;
  --gh-border-muted:#21262d;
  --gh-fg:#e6edf3;
  --gh-fg-muted:#7d8590;
  --gh-fg-subtle:#6e7681;
  --gh-accent:#2f81f7;
  --gh-accent-subtle:rgba(56,139,253,.15);
  --gh-open-fg:#3fb950;
  --gh-open-emphasis:#238636;
  --gh-open-subtle:#12261e;
  --gh-done-fg:#a371f7;
  --gh-done-emphasis:#8957e5;
  --gh-done-subtle:#251a3d;
  --gh-danger-fg:#f85149;
  --gh-danger-emphasis:#da3633;
  --gh-danger-subtle:#3d1418;
  --gh-btn-bg:#21262d;
  --gh-btn-border:rgba(240,246,252,.1);
  --gh-btn-hover:#30363d;
  --gh-btn-shadow:0 0 transparent;
  --gh-neutral:rgba(110,118,129,.25);
  --gh-counter-bg:rgba(110,118,129,.4);
}
@media (prefers-color-scheme:dark){
  html:not([data-theme]) .gh{
    --gh-canvas:#0d1117;
    --gh-canvas-subtle:#161b22;
    --gh-canvas-inset:#010409;
    --gh-border:#30363d;
    --gh-border-muted:#21262d;
    --gh-fg:#e6edf3;
    --gh-fg-muted:#7d8590;
    --gh-fg-subtle:#6e7681;
    --gh-accent:#2f81f7;
    --gh-accent-subtle:rgba(56,139,253,.15);
    --gh-open-fg:#3fb950;
    --gh-open-emphasis:#238636;
    --gh-open-subtle:#12261e;
    --gh-done-fg:#a371f7;
    --gh-done-emphasis:#8957e5;
    --gh-done-subtle:#251a3d;
    --gh-danger-fg:#f85149;
    --gh-danger-emphasis:#da3633;
    --gh-danger-subtle:#3d1418;
    --gh-btn-bg:#21262d;
    --gh-btn-border:rgba(240,246,252,.1);
    --gh-btn-hover:#30363d;
    --gh-btn-shadow:0 0 transparent;
    --gh-neutral:rgba(110,118,129,.25);
    --gh-counter-bg:rgba(110,118,129,.4);
  }
}

.gh *,.gh *::before,.gh *::after{box-sizing:border-box}
.gh a{color:var(--gh-accent);text-decoration:none}
.gh a:hover{text-decoration:underline}
/* 站内 nameHTML 自带洛谷等级色（--u-color），别被 .gh a 的链接蓝盖掉 */
.gh a.user-name{color:var(--u-color,currentColor);text-decoration:none}
.gh svg{display:block;flex:none;fill:currentColor}
.gh [hidden]{display:none!important}

/* 头像 */
.gh-av{
  display:inline-flex;align-items:center;justify-content:center;flex:none;
  border-radius:50%;overflow:hidden;line-height:1;
  color:var(--gh-fg-muted);background:var(--gh-canvas-subtle);
  font-weight:400;user-select:none;font-size:16px;
}
/* 站内 avatarHTML 的 .av-txt / .av-img 是绝对定位，字号继承根 span，按容器给 */
.gh-tl-rail .gh-av{font-size:16px}
.gh-side-row .gh-av{font-size:10px}
.gh-parts .gh-av{font-size:11px}
/* VIP 头像框要露到头像外：style.css 的 [data-frame] 白名单靠 thread-avatar 命中，这里再兜一层 */
.gh-av[data-frame]{overflow:visible}
.gh-av img{width:100%;height:100%;object-fit:cover;display:block;border-radius:50%}

/* 页面壳：GitHub 的 issue 区是整块白底 */
.gh-page{
  padding:8px 24px 28px;
  background:var(--gh-canvas);
  border:1px solid var(--gh-border);
  border-radius:6px;
}
.gh-pad{padding:0 16px}

/* ---------- 按钮 ---------- */
.gh-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:4px;flex:none;
  height:32px;padding:0 12px;
  font-family:inherit;font-size:14px;font-weight:500;line-height:20px;
  color:var(--gh-fg);background:var(--gh-btn-bg);
  border:1px solid var(--gh-btn-border);border-radius:6px;
  box-shadow:var(--gh-btn-shadow);cursor:pointer;white-space:nowrap;
  -webkit-appearance:none;appearance:none;
  transition:background-color .08s ease-in;
}
.gh-btn:hover{background:var(--gh-btn-hover);text-decoration:none}
.gh-btn:active{background:var(--gh-btn-hover);box-shadow:none}
.gh-btn[disabled]{opacity:.55;cursor:default}
.gh-btn--primary{color:#fff;background:var(--gh-open-emphasis);border-color:rgba(31,35,40,.15)}
.gh-btn--primary:hover{background:#1a7f37}
html[data-theme="dark"] .gh-btn--primary:hover{background:#2ea043}
.gh-btn--danger{color:var(--gh-fg);background:var(--gh-btn-bg)}
.gh-btn--danger:hover{color:#fff;background:var(--gh-danger-emphasis);border-color:rgba(31,35,40,.15)}
.gh-btn--sm{height:28px;padding:0 8px;font-size:12px}
/* 链接做成按钮时别被 .gh a 的链接色和下滑线抢走 */
.gh a.gh-btn,.gh a.gh-btn:hover{color:var(--gh-fg);text-decoration:none}
.gh a.gh-btn--primary,.gh a.gh-btn--primary:hover{color:#fff}
.gh-btn--split{border-top-right-radius:0;border-bottom-right-radius:0;border-right:0}
.gh-split{display:inline-flex}
.gh-split__arrow{
  display:inline-flex;align-items:center;justify-content:center;
  width:26px;height:32px;padding:0;
  color:var(--gh-fg);background:var(--gh-btn-bg);
  border:1px solid var(--gh-btn-border);border-left:0;
  border-radius:0 6px 6px 0;box-shadow:var(--gh-btn-shadow);cursor:pointer;
}
.gh-split__arrow:hover{background:var(--gh-btn-hover)}
.gh-split__arrow svg{width:12px;height:12px}

/* ---------- 列表页 ---------- */
.gh-listhead{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:8px 0 16px;
}
.gh-listhead h1{
  margin:0;font-size:20px;font-weight:600;line-height:1.25;color:var(--gh-fg);
  display:flex;align-items:center;gap:8px;
}
.gh-listhead h1 .gh-crumb{color:var(--gh-fg-muted);font-weight:400}
.gh-listhead h1 .gh-crumb a{color:var(--gh-fg-muted)}
.gh-listhead h1 .gh-crumb a:hover{color:var(--gh-accent)}

/* 过滤条：搜索 + Filters + Open/Closed */
.gh-bar{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  padding-bottom:16px;
}
.gh-search{
  position:relative;flex:1 1 260px;min-width:200px;max-width:none;
}
.gh-search svg{
  position:absolute;left:8px;top:50%;transform:translateY(-50%);
  width:16px;height:16px;color:var(--gh-fg-muted);pointer-events:none;
}
.gh-search input{
  width:100%;height:32px;padding:0 12px 0 32px;
  font-family:inherit;font-size:14px;color:var(--gh-fg);
  background:var(--gh-canvas);border:1px solid var(--gh-border);border-radius:6px;
  box-shadow:none;outline:none;
}
.gh-search input::placeholder{color:var(--gh-fg-subtle)}
.gh-search input:focus{border-color:var(--gh-accent);box-shadow:0 0 0 3px var(--gh-accent-subtle)}
.gh-bar__right{display:flex;align-items:center;gap:8px;margin-left:auto}
.gh-tab{
  display:inline-flex;align-items:center;gap:6px;
  height:32px;padding:0 12px;font-size:14px;font-weight:500;
  color:var(--gh-fg-muted);border-radius:6px;
}
.gh-tab:hover{background:var(--gh-canvas-subtle);color:var(--gh-fg);text-decoration:none}
.gh-tab.is-on{color:var(--gh-fg);font-weight:600}
.gh-tab svg{width:16px;height:16px}
.gh-tab.is-on svg{color:var(--gh-open-fg)}
.gh-tab.is-on.is-closed svg{color:var(--gh-done-fg)}
.gh-tab.is-on.is-ignored svg{color:var(--gh-fg-muted)}
.gh-counter{
  display:inline-block;min-width:20px;padding:0 6px;
  font-size:12px;font-weight:500;line-height:18px;text-align:center;
  color:var(--gh-fg);background:var(--gh-counter-bg);border-radius:2em;
}

/* issue 列表 */
.gh-issues{border-top:1px solid var(--gh-border)}
.gh-row{
  position:relative;display:flex;align-items:flex-start;gap:8px;
  padding:8px 16px;border-bottom:1px solid var(--gh-border);
}
.gh-row:hover{background:var(--gh-canvas-subtle)}
.gh-row__ico{width:16px;height:16px;margin-top:3px;color:var(--gh-open-fg)}
.gh-row.is-done .gh-row__ico{color:var(--gh-done-fg)}
.gh-row.is-ignored .gh-row__ico{color:var(--gh-fg-muted)}
.gh-row__main{flex:1;min-width:0}
/* 标题是 <a>，但 GitHub 那里默认是正文色，hover 才变蓝 */
.gh a.gh-row__title{
  display:block;font-size:16px;font-weight:600;line-height:1.5;
  color:var(--gh-fg);overflow-wrap:anywhere;text-decoration:none;
}
.gh a.gh-row__title:hover{color:var(--gh-accent);text-decoration:underline}
.gh-row.is-done .gh-row__title,.gh a.gh-row__title.is-done{color:var(--gh-fg-muted)}
.gh-row__meta{
  display:block;margin-top:2px;font-size:12px;line-height:1.5;color:var(--gh-fg-muted);
}
.gh-row__meta b{font-weight:400}
.gh-row__meta a{color:var(--gh-fg-muted)}
.gh-row__meta a:hover{color:var(--gh-accent)}
.gh-row__labels{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
.gh-row__right{display:flex;align-items:center;gap:8px;padding-top:2px;flex:none}
.gh-row__cmt{
  display:inline-flex;align-items:center;gap:4px;
  font-size:12px;color:var(--gh-fg-muted);
}
.gh-row__cmt svg{width:16px;height:16px}

/* 标签 pill（GitHub label） */
.gh-label{
  display:inline-block;padding:0 7px;
  font-size:12px;font-weight:500;line-height:18px;
  border:1px solid transparent;border-radius:2em;
  color:var(--gh-fg-muted);background:var(--gh-neutral);
  white-space:nowrap;
}
.gh-label--accent{color:var(--gh-accent);background:var(--gh-accent-subtle)}
.gh-label--open{color:var(--gh-open-fg);background:var(--gh-open-subtle)}
.gh-label--done{color:var(--gh-done-fg);background:var(--gh-done-subtle)}
.gh-label--muted{color:var(--gh-fg-muted);background:var(--gh-neutral)}
.gh-label--danger{color:var(--gh-danger-fg);background:var(--gh-danger-subtle)}

/* 空态 */
.gh-empty{padding:32px 16px;text-align:center;color:var(--gh-fg-muted)}
.gh-empty b{display:block;margin-bottom:4px;color:var(--gh-fg);font-weight:600}

/* 分页 / 加载更多 */
.gh-morewrap{display:flex;justify-content:center;padding:16px 0 8px}

/* ---------- 详情页 ---------- */
.gh-issue-hd{
  position:sticky;top:58px;z-index:6;
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  margin:0 -24px;padding:16px 24px 8px;background:var(--gh-canvas);
}
.gh-title{
  margin:0;padding-right:8px;
  font-size:32px;font-weight:400;line-height:1.25;letter-spacing:-.01em;
  color:var(--gh-fg);overflow-wrap:anywhere;
}
.gh-title__num{color:var(--gh-fg-muted);font-weight:300}
.gh-hd__acts{display:flex;align-items:center;gap:8px;flex:0 1 auto;flex-wrap:wrap;justify-content:flex-end;padding-top:2px}

.gh-issue-body{
  display:grid;grid-template-columns:minmax(0,1fr) 296px;gap:24px;
  align-items:start;padding-top:8px;
}

/* 状态行 */
.gh-state-row{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  padding:8px 0 16px;border-bottom:1px solid var(--gh-border);
  font-size:14px;color:var(--gh-fg-muted);
}
.gh-state{
  display:inline-flex;align-items:center;gap:6px;
  height:32px;padding:0 12px;border-radius:2em;
  font-size:14px;font-weight:500;white-space:nowrap;
}
.gh-state svg{width:16px;height:16px}
.gh-state--open{color:#fff;background:var(--gh-open-emphasis)}
.gh-state--done{color:#fff;background:var(--gh-done-emphasis)}
.gh-state--ignored{color:#fff;background:var(--gh-fg-muted)}
.gh-state-row b{color:var(--gh-fg);font-weight:600}
.gh-state-row a{color:var(--gh-fg-muted)}
.gh-state-row a:hover{color:var(--gh-accent)}

/* 时间线：一条竖线串起评论与事件（GitHub 的 TimelineItem） */
.gh-tl{position:relative;margin:16px 0 0}
.gh-tl::before{
  content:"";position:absolute;left:19px;top:20px;bottom:12px;
  width:2px;background:var(--gh-border);
}
.gh-tl-item,.gh-tl-ev{position:relative;display:flex;gap:16px;margin-bottom:16px}
.gh-tl-item:last-child,.gh-tl-ev:last-child{margin-bottom:0}
.gh-tl-rail{
  position:relative;z-index:1;flex:none;width:40px;
  display:flex;justify-content:center;align-items:flex-start;
}
/* 头像和徽章要挡住竖线，所以底色必须是不透明的 */
.gh-tl-rail .gh-av{position:relative;z-index:1;background:var(--gh-canvas-subtle)}
.gh-tl-badge{
  position:relative;z-index:1;width:26px;height:26px;margin-top:6px;
  border-radius:50%;display:flex;align-items:center;justify-content:center;
  color:var(--gh-fg-muted);background:var(--gh-canvas-subtle);
  box-shadow:0 0 0 2px var(--gh-canvas);
}
.gh-tl-badge svg{width:14px;height:14px}
.gh-tl-badge.is-done{color:var(--gh-done-fg)}
.gh-tl-badge.is-ignored{color:var(--gh-fg-muted)}
.gh-tl-badge.is-open{color:var(--gh-open-fg)}
.gh-tl-item__body,.gh-tl-ev__body{flex:1;min-width:0}

/* 事件行文字 */
.gh-tl-ev__body{min-height:26px;display:flex;flex-direction:column;justify-content:center}
.gh-tl-ev__txt{
  display:flex;align-items:center;gap:6px;flex-wrap:wrap;
  font-size:14px;line-height:1.5;color:var(--gh-fg-muted);
}
.gh-tl-ev__txt b{color:var(--gh-fg);font-weight:600}
.gh-tl-ev__txt a{color:var(--gh-fg-muted)}
.gh-tl-ev__txt a:hover{color:var(--gh-accent)}

.gh-tl-edits{margin-top:6px}
.gh-tl-edits summary{
  font-size:13px;color:var(--gh-fg-muted);cursor:pointer;list-style:none;width:max-content;
}
.gh-tl-edits summary::-webkit-details-marker{display:none}
.gh-tl-edits summary::before{content:"▸";display:inline-block;margin-right:5px;transition:transform .1s}
.gh-tl-edits[open] summary::before{transform:rotate(90deg)}
.gh-tl-edits summary:hover{color:var(--gh-accent)}
.gh-tl-edits .gh-edit{
  margin-top:6px;padding:8px 12px;
  background:var(--gh-canvas-subtle);border-radius:6px;
  border:1px solid var(--gh-border);
}

/* 评论卡 */
.gh-cmt{
  border:1px solid var(--gh-border);border-radius:6px;
  background:var(--gh-canvas);
}
/* 不能用 overflow:hidden：评论卡头部那个 ... 菜单是向下溢出的，会被裁掉 */
.gh-cmt__hd{
  display:flex;align-items:center;gap:8px;min-width:0;
  padding:8px 16px;font-size:14px;line-height:1.5;border-radius:6px 6px 0 0;
  color:var(--gh-fg-muted);background:var(--gh-canvas-subtle);
  border-bottom:1px solid var(--gh-border);
}
.gh-cmt__hd .gh-cmt__who{
  font-weight:600;color:var(--gh-fg);
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.gh-cmt__hd .gh-cmt__when{
  color:var(--gh-fg-muted);
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.gh-cmt__hd .gh-cmt__badge{
  padding:0 7px;font-size:12px;font-weight:500;line-height:18px;
  color:var(--gh-fg-muted);border:1px solid var(--gh-border);border-radius:2em;
  white-space:nowrap;flex-shrink:0;
}
.gh-cmt__acts{margin-left:auto;display:flex;align-items:center;gap:2px;flex-shrink:0;opacity:1}
.gh-ico-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:28px;height:28px;padding:0;border:0;border-radius:6px;
  color:var(--gh-fg-muted);background:transparent;cursor:pointer;
}
.gh-ico-btn:hover{background:var(--gh-neutral);color:var(--gh-fg)}
.gh-ico-btn svg{width:16px;height:16px}
.gh-menu-wrap{position:relative;display:inline-flex;z-index:2}
.gh-menu{
  position:absolute;top:100%;right:0;z-index:100;margin-top:4px;min-width:168px;
  padding:4px 0;background:var(--gh-canvas);
  border:1px solid var(--gh-border);border-radius:6px;
  box-shadow:0 8px 24px rgba(31,35,40,.15);
}
.gh-menu__item{
  display:block;width:100%;padding:6px 16px;text-align:left;
  font-family:inherit;font-size:14px;line-height:1.5;color:var(--gh-fg);
  background:transparent;border:0;cursor:pointer;white-space:nowrap;
}
.gh-menu__item:hover{background:var(--gh-canvas-subtle)}

/* 站长专用：列表里的公开开关 / 删除，菜单里的危险项 */
.gh-row__admin{display:flex;align-items:center;gap:6px;padding-top:2px;flex:none}
.gh-row__admin .gh-btn svg{width:14px;height:14px;vertical-align:-2px;margin-right:2px}
.gh-row__admin .gh-btn--danger{color:var(--gh-danger-fg)}
.gh-menu__item.is-danger{color:var(--gh-danger-fg)}
.gh-menu__item.is-danger:hover{background:var(--gh-danger-subtle)}
.gh-cmt__bd{padding:16px;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.gh-cmt__bd > *:first-child{margin-top:0}
.gh-cmt__bd > *:last-child{margin-bottom:0}

/* 评论区里的 markdown（覆盖项目 .markdown-body） */
.gh .markdown-body{font-size:14px;line-height:1.5;color:var(--gh-fg);word-break:break-word}
.gh .markdown-body p{margin:0 0 10px}
.gh .markdown-body h1,.gh .markdown-body h2{margin:24px 0 16px;font-weight:600;line-height:1.25;border-bottom:1px solid var(--gh-border-muted);padding-bottom:.3em}
.gh .markdown-body h1{font-size:2em}
.gh .markdown-body h2{font-size:1.5em}
.gh .markdown-body h3{font-size:1.25em;margin:16px 0;font-weight:600}
.gh .markdown-body h4{font-size:1em;margin:16px 0;font-weight:600}
.gh .markdown-body h5{font-size:.875em;margin:16px 0;font-weight:600}
.gh .markdown-body a{color:var(--gh-accent)}
.gh .markdown-body a:hover{text-decoration:underline}
.gh .markdown-body ul,.gh .markdown-body ol{margin:0 0 10px;padding-left:2em}
.gh .markdown-body li{margin:.25em 0}
.gh .markdown-body li>p{margin:.25em 0}
.gh .markdown-body code{
  padding:.2em .4em;font-family:var(--gh-mono);font-size:85%;
  background:var(--gh-neutral);border-radius:6px;
}
.gh .markdown-body pre{
  margin:0 0 10px;padding:16px;overflow:auto;line-height:1.45;
  background:var(--gh-canvas-subtle);border-radius:6px;
}
.gh .markdown-body pre code{
  padding:0;font-size:85%;background:transparent;border-radius:0;white-space:pre;
}
.gh .markdown-body blockquote{
  margin:0 0 10px;padding:0 1em;color:var(--gh-fg-muted);
  border-left:.25em solid var(--gh-border);
}
.gh .markdown-body hr{height:.25em;margin:24px 0;padding:0;background:var(--gh-border);border:0}
.gh .markdown-body img{max-width:100%;border-radius:6px}
.gh .markdown-body table{border-collapse:collapse;margin:0 0 10px;display:block;overflow:auto;max-width:100%}
.gh .markdown-body th,.gh .markdown-body td{padding:6px 13px;border:1px solid var(--gh-border)}
.gh .markdown-body th{font-weight:600;background:var(--gh-canvas-subtle)}
.gh .markdown-body .mention{color:var(--gh-accent);font-weight:600}

/* 编辑事件里展开的旧版本 */
.gh-edit{font-size:13px}
.gh-edit__meta{color:var(--gh-fg-muted);font-size:12px;margin-bottom:2px}
.gh-edit b{display:block;margin:2px 0;font-weight:600;font-size:13px}
.gh-edit pre{
  margin:4px 0 0;white-space:pre-wrap;word-break:break-word;
  font-family:var(--gh-mono);font-size:12px;color:var(--gh-fg-muted);
}

/* ---------- 编辑器（评论 / 新建 / 编辑共用） ---------- */
.gh-editor{
  border:1px solid var(--gh-border);border-radius:6px;
  background:var(--gh-canvas);overflow:hidden;
}
.gh-editor__tabs{
  display:flex;align-items:center;gap:0;
  padding:0 8px;background:var(--gh-canvas-subtle);
  border-bottom:1px solid var(--gh-border);
}
.gh-wtab{
  padding:8px 8px 7px;margin-bottom:-1px;
  font-family:inherit;font-size:14px;font-weight:400;line-height:20px;
  color:var(--gh-fg-muted);background:transparent;border:0;
  border-bottom:2px solid transparent;cursor:pointer;
}
.gh-wtab:hover{color:var(--gh-fg)}
.gh-wtab.is-on{color:var(--gh-fg);font-weight:600;border-bottom-color:#fd8c73}
.gh-mdbar{display:flex;align-items:center;gap:2px;margin-left:auto}
.gh-mdbar .gh-ico-btn{width:28px;height:28px}

.gh-editor__area{position:relative}
.gh-editor textarea{
  display:block;width:100%;min-height:120px;padding:8px 12px;
  font-family:var(--gh-font);font-size:14px;line-height:1.5;color:var(--gh-fg);
  background:var(--gh-canvas);border:0;outline:none;resize:vertical;
}
.gh-editor textarea::placeholder{color:var(--gh-fg-subtle)}
.gh-editor__prev{
  min-height:120px;padding:8px 12px;font-size:14px;line-height:1.5;
  overflow-wrap:anywhere;
}
.gh-editor__prev .gh-editor__none{color:var(--gh-fg-subtle)}




/* ---------- 侧栏 ---------- */
.gh-side{border-top:1px solid var(--gh-border)}
.gh-side-block{padding:16px 0;border-bottom:1px solid var(--gh-border)}
.gh-side-block:first-child{border-top:0}
.gh-side-hd{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  margin-bottom:8px;
}
.gh-side-hd h3{margin:0;font-size:12px;font-weight:600;line-height:1.5;color:var(--gh-fg-muted)}
.gh-side-hd .gh-ico-btn{width:24px;height:24px;margin:-2px -4px -2px 0}
.gh-side-bd{font-size:12px;color:var(--gh-fg-muted);line-height:1.5}
.gh-side-none{color:var(--gh-fg-muted);font-size:12px}
.gh-side-row{display:flex;align-items:center;gap:8px;padding:2px 0;font-size:12px;color:var(--gh-fg)}
.gh-side-row img,.gh-side-row .gh-avin{
  width:20px;height:20px;border-radius:50%;flex:none;
  display:flex;align-items:center;justify-content:center;
  font-size:10px;color:var(--gh-fg-muted);background:var(--gh-canvas-subtle);
  overflow:hidden;
}
.gh-side-row img{object-fit:cover}


.gh-parts{display:flex;flex-wrap:wrap;gap:6px}
.gh-parts img,.gh-parts .gh-avin{
  width:26px;height:26px;border-radius:50%;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  font-size:11px;color:var(--gh-fg-muted);background:var(--gh-canvas-subtle);
}
.gh-parts img{object-fit:cover}

/* ---------- 表单（新建 / 编辑） ---------- */
.gh-form{display:flex;flex-direction:column;gap:16px}
.gh-field{display:flex;flex-direction:column;gap:4px}
.gh-field label,.gh-field .gh-label-txt{font-size:14px;font-weight:600;color:var(--gh-fg)}
.gh-field .gh-label-txt .req{color:var(--gh-danger-fg);margin-left:2px}
.gh-input{
  width:100%;height:32px;padding:0 12px;
  font-family:inherit;font-size:14px;color:var(--gh-fg);
  background:var(--gh-canvas-subtle);border:1px solid var(--gh-border);border-radius:6px;
  outline:none;
}
.gh-input:focus{background:var(--gh-canvas);border-color:var(--gh-accent);box-shadow:0 0 0 3px var(--gh-accent-subtle)}
.gh-hint{font-size:12px;color:var(--gh-fg-muted)}
.gh-hint.is-pub{color:var(--gh-open-fg)}
.gh-err{min-height:0;font-size:13px;color:var(--gh-danger-fg)}
.gh-err:empty{display:none}
.gh-form__ft{display:flex;justify-content:flex-end;gap:8px;padding-top:8px}

/* 类型选择：GitHub 的 label 选择器观感 */
.gh-types{display:flex;flex-wrap:wrap;gap:8px}
.gh-type{
  display:inline-flex;align-items:center;gap:6px;
  height:28px;padding:0 12px;
  font-family:inherit;font-size:12px;font-weight:500;
  color:var(--gh-fg-muted);background:var(--gh-neutral);
  border:1px solid transparent;border-radius:2em;cursor:pointer;
}
.gh-type:hover{filter:brightness(.97)}
.gh-type.is-on{color:#fff;background:var(--gh-open-emphasis)}
.gh-type.is-on .gh-type__dot{background:#fff}

/* 返回链接：GitHub 二级按钮的迷你版，别让它变成一行飘着的蓝字 */
.gh-back{display:flex;margin:0 0 12px}
.gh a.gh-back__link{
  display:inline-flex;align-items:center;gap:5px;
  height:28px;margin-left:-9px;padding:0 10px 0 7px;
  border:1px solid var(--gh-btn-border);border-radius:6px;
  background:var(--gh-btn-bg);box-shadow:var(--gh-btn-shadow);
  font-size:12px;font-weight:500;line-height:1;
  color:var(--gh-fg);text-decoration:none;
  transition:background-color .1s,border-color .1s;
}
.gh a.gh-back__link:hover{background:var(--gh-btn-hover);color:var(--gh-fg);text-decoration:none}
.gh a.gh-back__link:active{box-shadow:none}
.gh a.gh-back__link svg{width:14px;height:14px;flex:none;color:var(--gh-fg-muted)}

/* 横幅（封禁提示） */
.gh-banner{
  padding:8px 16px;margin-bottom:16px;
  font-size:13px;color:var(--gh-fg);
  background:var(--gh-canvas-subtle);
  border:1px solid var(--gh-border);border-left:4px solid var(--gh-danger-emphasis);
  border-radius:6px;
}
.gh-banner b{display:block;margin-bottom:2px;font-weight:600}
.gh-banner span{color:var(--gh-fg-muted)}

/* ---------- 响应式 ---------- */
@media (max-width:860px){
  .gh-page{padding:8px 12px 20px}
  .gh-title{font-size:24px}
  .gh-issue-body{grid-template-columns:minmax(0,1fr);gap:16px}
  .gh-side{border-top:1px solid var(--gh-border)}
  .gh-issue-hd{position:static;top:auto;margin:0 -12px;padding:12px 12px 8px}
  .gh-tl-item,.gh-tl-ev{gap:12px}
  .gh-tl-rail{width:32px}
  .gh-tl-rail .gh-av{width:32px!important;height:32px!important;font-size:13px!important}
  .gh-tl::before{left:15px}
  .gh-tl-badge{width:24px;height:24px}
  .gh-hd__acts .gh-btn span{display:none}
}
@media (max-width:560px){
  .gh-row{padding:8px 12px}
  .gh-row__title{font-size:15px}
  .gh-mdbar{display:none}
  .gh-title{font-size:20px}
  .gh-cmt__hd{padding:6px 10px;gap:6px;font-size:13px}
  .gh-cmt__bd{padding:12px}
}
