/* GitHub 商店 /tools/github_store —— 响应式排版（桌面 / 平板 / 手机 / 小屏手机）
 * 断点策略：
 *   ≥1441px  超大屏：最宽松留白
 *   1024–1280 中小屏 / 平板横屏：收窄边距，避免大屏过度拉伸
 *   768–1023 平板竖屏
 *   ≤700px   手机（与站点 .mobile-header 53px 对齐）
 *   ≤480px   小屏手机：卡片转单列、资源控件全宽
 */

/* ---------- 页面容器（工具箱整屏规范：解除限宽，铺满桌面端，保留左导航） ---------- */
.gs-page {
  --gs-gap: 16px;
  max-width: none;
  margin: 0;
  padding: 28px 32px 64px;
  box-sizing: border-box;
}
@media (min-width: 1441px) { .gs-page { padding: 40px 56px 80px; } }
@media (min-width: 1024px) and (max-width: 1280px) { .gs-page { padding: 26px 28px 56px; } }
@media (min-width: 768px) and (max-width: 1023px) { .gs-page { padding: 22px 22px 52px; } }
@media (max-width: 700px) { .gs-page { padding: 16px 14px 44px; } }

/* ---------- Hero ---------- */
.gs-hero {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 26px; margin-bottom: 22px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--bg-primary)), var(--bg-primary));
  border: 1px solid var(--border-color, #e6e8ec);
  border-radius: 18px;
}
.gs-hero-icon {
  width: 60px; height: 60px; flex: none; display: grid; place-items: center;
  font-size: 30px; border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.gs-hero-text h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.2; }
.gs-hero-text h1 a { color: inherit; text-decoration: none; }
.gs-hero-text h1 a:hover { text-decoration: underline; }
.gs-hero-text p { margin: 0; color: var(--text-secondary, #6b7280); font-size: 14px; line-height: 1.6; }
@media (max-width: 700px) {
  /* 手机端：图标与「GitHub 商店」保持同一行 */
  .gs-hero { flex-direction: row; align-items: center; text-align: left; padding: 16px 16px; gap: 12px; }
  .gs-hero-text { min-width: 0; }
  .gs-hero-text p { font-size: 13px; }
}
@media (max-width: 420px) {
  .gs-hero-text h1 { font-size: 22px; }
  .gs-hero-icon { width: 52px; height: 52px; font-size: 26px; }
}
@media (max-width: 420px) {
  .gs-hero-text h1 { font-size: 22px; }
  .gs-hero-icon { width: 52px; height: 52px; font-size: 26px; }
}

/* ---------- 工具栏 ---------- */
.gs-toolbar {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  margin-bottom: 16px;
}
/* position:relative 供「最近搜索」下拉绝对定位 */
.gs-search { position: relative; display: flex; flex: 1 1 420px; min-width: 0; gap: 10px; }
.gs-search-input {
  flex: 1; min-width: 0; padding: 12px 14px 12px 40px; border-radius: 12px;
  border: 1px solid var(--border-color, #e0e2e8); background: var(--bg-primary);
  color: var(--text-primary); font-size: 14px; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 13px center; background-size: 16px;
}
.gs-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

/* ---------- 最近搜索下拉（与工具箱 / 首页搜索框视觉一致，复用 .recent-search-* 样式） ---------- */
.gs-recent {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40;
  background: var(--bg-primary); border: 1px solid var(--border-color, #e0e2e8);
  border-radius: 14px; padding: 4px; box-shadow: 0 14px 40px rgba(0, 0, 0, .22);
  max-height: 60vh; overflow-y: auto;
}
.gs-recent[hidden] { display: none; }
.gs-toolbar-right { display: flex; align-items: center; gap: 8px; flex: none; }
.gs-mirror-label { font-size: 13px; color: var(--text-secondary, #6b7280); white-space: nowrap; }
.gs-mirror-select {
  padding: 11px 12px; border-radius: 12px; border: 1px solid var(--border-color, #e0e2e8);
  background: var(--bg-primary); color: var(--text-primary); font-size: 14px; cursor: pointer; max-width: 220px;
}
@media (max-width: 700px) {
  .gs-toolbar { gap: 10px; }
  .gs-search { flex: 1 1 100%; }
  .gs-toolbar-right { flex: 1 1 100%; justify-content: space-between; }
  .gs-mirror-select { flex: 1; max-width: none; }
  .gs-search-input, .gs-mirror-select, .gs-btn { font-size: 16px; } /* 防 iOS 聚焦缩放 */
}

/* ---------- 顶部视图选项卡 ---------- */
.gs-tabs { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.gs-tab {
  padding: 9px 18px; border-radius: 12px; border: 1px solid var(--border-color, #e0e2e8);
  background: var(--bg-primary); color: var(--text-secondary, #5b6470); font-size: 14px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.gs-tab.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.gs-tab:hover:not(.is-active) { border-color: var(--accent); }
@media (max-width: 700px) {
  .gs-tabs { gap: 8px; margin-bottom: 14px; }
  .gs-tab { flex: 1 1 auto; text-align: center; padding: 8px 14px; font-size: 13px; }
}

/* ---------- 按钮 ---------- */
.gs-btn {
  padding: 11px 18px; border-radius: 12px; border: 1px solid transparent;
  font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, filter .15s, border-color .15s;
}
.gs-btn-primary { background: var(--accent); color: #fff; }
.gs-btn-primary:hover { filter: brightness(1.06); }
.gs-btn-ghost { background: transparent; border-color: var(--border-color, #d8dbe2); color: var(--text-primary); }
.gs-btn-ghost:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* ---------- 分类标签 ---------- */
.gs-cats { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 20px; }
.gs-cat {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-color, #e0e2e8);
  background: var(--bg-primary); color: var(--text-secondary, #5b6470); font-size: 13px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.gs-cat.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
@media (max-width: 700px) {
  .gs-cats {
    flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .gs-cats::-webkit-scrollbar { display: none; }
  .gs-cat { flex: none; }
}

/* ---------- 状态 / 提示 ---------- */
.gs-status { padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--text-primary); margin-bottom: 16px; font-size: 13px; }
.gs-status.is-error { background: color-mix(in srgb, #ef4444 14%, transparent); }

/* ---------- 区块标题 ---------- */
.gs-section-title { font-size: 17px; font-weight: 600; margin: 26px 0 14px; }
.gs-hint { font-size: 12px; color: var(--text-secondary, #8a94a6); font-weight: 400; margin-left: 8px; }
@media (max-width: 700px) { .gs-section-title { font-size: 15px; margin: 20px 0 12px; } }

/* ---------- 最近发布横向条 ---------- */
.gs-recent {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.gs-recent-item {
  flex: none; min-width: 210px; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border-color, #e6e8ec);
  background: var(--bg-primary); cursor: pointer; transition: border-color .15s;
}
.gs-recent-item:hover { border-color: var(--accent); }
.gs-recent-icon { font-size: 20px; flex: none; }
.gs-recent-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 90px; }
.gs-recent-tag { font-size: 11px; color: var(--accent); flex: none; }
.gs-recent-date { font-size: 11px; color: var(--text-secondary, #8a94a6); margin-left: auto; flex: none; }
@media (max-width: 700px) {
  .gs-recent-item { min-width: 168px; padding: 9px 12px; }
  .gs-recent-name { max-width: 70px; }
}

/* ---------- 卡片网格 ---------- */
.gs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
@media (min-width: 768px) and (max-width: 1023px) {
  .gs-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
}
@media (max-width: 700px) {
  .gs-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } /* 手机两列 */
}
@media (max-width: 480px) {
  .gs-grid { grid-template-columns: 1fr; } /* 小屏单列 */
}
.gs-card {
  display: flex; gap: 14px; padding: 16px; border-radius: 16px;
  border: 1px solid var(--border-color, #e6e8ec); background: var(--bg-primary);
  cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; align-items: flex-start;
}
@media (hover: hover) {
  .gs-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,.10); border-color: color-mix(in srgb, var(--accent) 40%, var(--border-color)); }
}
.gs-card-icon {
  width: 48px; height: 48px; flex: none; display: grid; place-items: center;
  font-size: 26px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.gs-card-icon--def { background: color-mix(in srgb, var(--text-secondary, #888) 12%, transparent); }
.gs-card-body { min-width: 0; flex: 1; }
.gs-card-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; line-height: 1.35; }
.gs-badge {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.gs-badge--muted { background: color-mix(in srgb, var(--text-secondary, #888) 12%, transparent); color: var(--text-secondary, #888); }
.gs-badge--pre { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #b45309; }
/* 收藏量（星标数）徽章：在卡片标题、标签区、最近发布、详情头部复用 */
.gs-stars {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, #f5b301 18%, transparent); color: #b47900;
}
.gs-recent-item .gs-stars { margin-left: 4px; }
.gs-card-desc {
  font-size: 12.5px; color: var(--text-secondary, #6b7280); margin-top: 6px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gs-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gs-ptag {
  font-size: 11px; padding: 2px 8px; border-radius: 6px;
  background: color-mix(in srgb, var(--text-secondary, #888) 12%, transparent); color: var(--text-secondary, #555);
}
.gs-ptag--arch { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
@media (max-width: 700px) {
  .gs-card { gap: 11px; padding: 13px; border-radius: 14px; }
  .gs-card-icon { width: 42px; height: 42px; font-size: 22px; border-radius: 10px; }
  .gs-card-title { font-size: 14px; }
  .gs-card-desc { font-size: 12px; }
}

.gs-empty { padding: 28px; text-align: center; color: var(--text-secondary, #8a94a6); font-size: 14px; grid-column: 1 / -1; }

/* ---------- 分页 ---------- */
.gs-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; grid-column: 1 / -1; padding: 18px 0 6px; }
.gs-pager[hidden] { display: none; }
.gs-pg-btn {
  min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border-color, #d8dbe2); background: var(--bg-primary);
  color: var(--text-primary); font-size: 14px; line-height: 1; transition: border-color .15s, background .15s, color .15s;
}
.gs-pg-btn:hover:not(.is-active):not(:disabled) { border-color: var(--accent); color: var(--accent); }
.gs-pg-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; cursor: default; }
.gs-pg-btn:disabled { opacity: .45; cursor: default; }
.gs-pg-dots { color: var(--text-secondary, #8a94a6); padding: 0 2px; user-select: none; }
.gs-pg-jump { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; color: var(--text-secondary, #8a94a6); font-size: 13px; }
.gs-pg-jump-input {
  width: 52px; height: 36px; padding: 0 6px; text-align: center; box-sizing: border-box;
  border: 1px solid var(--border-color, #d8dbe2); border-radius: 10px; background: var(--bg-primary);
  color: var(--text-primary); font-size: 14px; line-height: 1;
}
.gs-pg-jump-input:focus { border-color: var(--accent); outline: none; }
.gs-pg-jump-btn { min-width: auto; padding: 0 12px; }
@media (max-width: 700px) {
  .gs-pg-btn { min-width: 34px; height: 34px; font-size: 13px; }
  .gs-pg-jump { margin-left: 4px; gap: 4px; }
  .gs-pg-jump-input { width: 46px; height: 34px; }
  .gs-pg-jump-btn { padding: 0 10px; }
}
@media (max-width: 420px) {
  .gs-pg-jump { width: 100%; margin-left: 0; justify-content: center; order: 5; }
}

/* ---------- 详情 ---------- */
.gs-detail { padding-top: 6px; }
.gs-back { margin-bottom: 16px; }
.gs-repo-head { display: flex; align-items: center; gap: 14px; margin: 8px 0 22px; }
.gs-repo-icon { font-size: 34px; flex: none; }
.gs-repo-title { font-size: 19px; font-weight: 700; line-height: 1.3; word-break: break-word; }
.gs-repo-sub { font-size: 13px; color: var(--text-secondary, #6b7280); margin-top: 3px; }
.gs-repo-sub a { color: var(--accent); }

.gs-release {
  border: 1px solid var(--border-color, #e6e8ec); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 16px; background: var(--bg-primary);
}
.gs-release.is-pre { border-style: dashed; }
.gs-release-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.gs-release-title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.gs-release-sub { font-size: 12.5px; color: var(--text-secondary, #6b7280); }
.gs-release-notes {
  font-size: 12.5px; color: var(--text-secondary, #555); white-space: pre-wrap; word-break: break-word;
  max-height: 220px; overflow: auto; margin: 12px 0; padding: 12px;
  background: color-mix(in srgb, var(--text-secondary, #888) 8%, transparent); border-radius: 10px; line-height: 1.6;
}
.gs-release-nofile { font-size: 13px; color: var(--text-secondary, #8a94a6); padding: 8px 0; }
.gs-assets { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.gs-asset {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 10px; background: color-mix(in srgb, var(--text-secondary, #888) 6%, transparent);
}
.gs-asset-name { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-asset-meta { display: flex; align-items: center; gap: 8px; flex: none; }
.gs-asset-size { font-size: 12px; color: var(--text-secondary, #8a94a6); }
.gs-asset-mirror {
  padding: 7px 8px; border-radius: 8px; border: 1px solid var(--border-color, #d8dbe2);
  background: var(--bg-primary); color: var(--text-primary); font-size: 12px; cursor: pointer;
}
.gs-asset-dl { padding: 7px 16px; border-radius: 9px; font-size: 13px; flex: none; }

@media (max-width: 700px) {
  .gs-back {
    position: sticky; top: 53px; z-index: 20; margin: 0 0 12px;
    background: var(--bg-primary); padding: 8px 0;
  }
  .gs-repo-head { gap: 12px; margin: 4px 0 18px; }
  .gs-repo-title { font-size: 17px; }
  .gs-release { padding: 14px 14px; margin-bottom: 14px; border-radius: 12px; }
  .gs-release-notes { max-height: 180px; }
  .gs-asset { flex-wrap: wrap; gap: 10px; padding: 10px; }
  .gs-asset-name { flex-basis: 100%; }
  .gs-asset-meta { flex: 1 1 auto; flex-wrap: wrap; }
  .gs-asset-mirror { flex: 1 1 120px; font-size: 14px; }
  .gs-asset-dl { flex: 1 1 100px; font-size: 14px; text-align: center; }
}
@media (max-width: 480px) {
  .gs-asset-mirror { flex: 1 1 100%; }
  .gs-asset-dl { flex: 1 1 100%; }
}

/* ---------- 应用介绍 ---------- */
.gs-repo-desc {
  margin: 0 0 22px; padding: 16px 18px;
  border: 1px solid var(--border-color, #e6e8ec); border-radius: 14px; background: var(--bg-primary);
}
.gs-repo-desc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.gs-repo-desc-title { font-size: 15px; font-weight: 600; }
.gs-repo-desc-body { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text-primary); word-break: break-word; }
.gs-repo-desc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.gs-set-seg--mini { gap: 6px; }
.gs-set-seg--mini .gs-set-seg-btn { padding: 6px 12px; font-size: 13px; }
@media (max-width: 700px) {
  .gs-repo-desc { padding: 14px 14px; margin-bottom: 18px; border-radius: 12px; }
  .gs-repo-desc-body { font-size: 13.5px; }
}

/* ---------- 说明 ---------- */
.gs-note {
  margin-top: 30px; padding: 14px 16px; border-radius: 12px;
  border: 1px dashed var(--border-color, #d8dbe2);
  font-size: 12.5px; color: var(--text-secondary, #6b7280); line-height: 1.7;
}
.gs-note strong { color: var(--text-primary); }
@media (max-width: 700px) { .gs-note { margin-top: 22px; font-size: 12px; } }

/* ---------- Toast ---------- */
.gs-toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  background: rgba(20,22,28,.92); color: #fff; padding: 11px 18px; border-radius: 10px;
  font-size: 13px; z-index: 99999; pointer-events: none; max-width: 90vw;
}
.gs-toast[hidden] { display: none; }
@media (max-width: 700px) { .gs-toast { bottom: 16px; } }

/* ---------- 设置按钮 ---------- */
.gs-set-btn { padding: 11px 14px; font-size: 14px; flex: none; white-space: nowrap; }
@media (max-width: 700px) {
  .gs-set-btn { padding: 11px 14px; font-size: 14px; }
}

/* ---------- 账户区（复用现有登录体系，收藏按账户跨设备同步） ---------- */
.gs-userbox { display: inline-flex; align-items: center; flex: none; }
.gs-userbox-in { display: inline-flex; align-items: center; gap: 6px; }
.gs-user-name {
  font-size: 13px; color: var(--text-primary); max-width: 120px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gs-user-login { text-decoration: none; }
.gs-fav-login-link { color: var(--accent, #4aa3ff); text-decoration: none; }
.gs-fav-login-link:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .gs-user-name { display: none; }
}

/* ---------- 设置弹窗 ---------- */
.gs-mask {
  position: fixed; inset: 0; z-index: 100000;
  display: grid; place-items: center; padding: 20px;
  background: rgba(15,18,24,.42);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.gs-mask[hidden] { display: none; }
.gs-modal {
  width: 100%; max-width: 420px; background: var(--bg-primary); color: var(--text-primary);
  border: 1px solid var(--border-color, #e6e8ec); border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,.28); overflow: hidden;
}
.gs-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border-color, #eef0f3);
}
.gs-modal-head h2 { margin: 0; font-size: 17px; }
.gs-modal-close {
  border: none; background: transparent; cursor: pointer; font-size: 22px; line-height: 1;
  color: var(--text-secondary, #8a94a6); padding: 2px 6px; border-radius: 8px;
}
.gs-modal-close:hover { background: color-mix(in srgb, var(--text-secondary, #888) 14%, transparent); }
.gs-modal-body { padding: 18px; display: flex; flex-direction: column; gap: 18px; }
.gs-set-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gs-set-label { font-size: 14px; font-weight: 600; flex: none; min-width: 96px; }
.gs-set-select {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border-color, #d8dbe2); background: var(--bg-primary);
  color: var(--text-primary); font-size: 14px; cursor: pointer;
}
.gs-set-seg {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.gs-set-seg-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border-color, #d8dbe2);
  background: var(--bg-primary); font-size: 14px; color: var(--text-secondary, #5b6470);
  transition: border-color .15s, background .15s, color .15s;
}
.gs-set-seg-btn input { accent-color: var(--accent); margin: 0; }
.gs-set-seg-btn:has(input:checked) {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text-primary); font-weight: 600;
}
/* 独立开关（最近搜索等） */
.gs-set-check {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border-color, #d8dbe2);
  background: var(--bg-primary); color: var(--text-secondary); font-size: 14px;
  transition: border-color .15s, background .15s, color .15s;
}
.gs-set-check input { accent-color: var(--accent); margin: 0; }
.gs-set-check:has(input:checked) {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text-primary); font-weight: 600;
}
.gs-set-note { margin: 0; font-size: 12px; color: var(--text-secondary, #8a94a6); line-height: 1.6; }
.gs-modal-foot {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  border-top: 1px solid var(--border-color, #eef0f3);
}
.gs-modal-spacer { flex: 1; }
@media (max-width: 700px) {
  .gs-mask { padding: 0; align-items: flex-end; }
  .gs-modal {
    max-width: none; border-radius: 18px 18px 0 0; border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .gs-set-row { gap: 10px; }
  .gs-set-label { min-width: 100%; }
  .gs-set-seg { flex: 1; }
  .gs-set-seg-btn { flex: 1 1 auto; justify-content: center; font-size: 14px; }
  .gs-set-check { flex: 1 1 auto; justify-content: center; }
  .gs-modal-foot .gs-btn { flex: 1; text-align: center; }
}

/* ---------- 收藏 ---------- */
.gs-tab-count {
  margin-left: 6px; font-size: 11px; font-weight: 700; line-height: 1;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
  padding: 2px 7px; border-radius: 999px;
}
.gs-tab.is-active .gs-tab-count { background: rgba(255, 255, 255, .22); color: #fff; }
.gs-fav-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border-color, #e0e2e8); background: var(--bg-primary);
  color: #c2c8d2; cursor: pointer; font-size: 18px; line-height: 1;
  transition: transform .12s, color .12s, background .12s, border-color .12s;
}
.gs-card .gs-fav-btn { position: absolute; top: 10px; right: 10px; z-index: 3; }
.gs-card--fav .gs-card-title { padding-right: 34px; }
.gs-fav-btn:hover { border-color: var(--accent); color: var(--accent); }
.gs-fav-btn.is-on {
  color: #f5b301; border-color: color-mix(in srgb, #f5b301 55%, var(--border-color));
  background: color-mix(in srgb, #f5b301 14%, transparent);
}
.gs-fav-btn:active { transform: scale(.9); }
.gs-fav-detail { margin-left: auto; flex: none; }
.gs-fav-cat-list { display: flex; flex-direction: column; gap: 8px; }
.gs-fav-cat {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border-color, #e6e8ec); background: var(--bg-primary); font-size: 14px; cursor: pointer;
}
.gs-fav-cat input { accent-color: var(--accent); margin: 0; }
.gs-fav-new { display: flex; gap: 8px; }
.gs-fav-new-input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border-color, #d8dbe2); background: var(--bg-primary);
  color: var(--text-primary); font-size: 14px;
}
.gs-fav-new-input:focus { border-color: var(--accent); outline: none; }
@media (max-width: 700px) {
  .gs-fav-new-input, .gs-fav-new .gs-btn { font-size: 16px; }
}

/* ---------- 教程 ---------- */
.gs-tut-pane { display: block; }
.gs-tut {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}
.gs-tut-side {
  position: sticky; top: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color, #e6e8ec);
  border-radius: 14px;
  padding: 14px;
}
.gs-tut-side-title { font-size: 13px; font-weight: 700; color: var(--text-secondary, #6b7280); margin-bottom: 10px; }
.gs-tut-list { display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 120px); overflow: auto; }
.gs-tut-item {
  padding: 9px 11px; border-radius: 9px; font-size: 14px; cursor: pointer;
  color: var(--text-primary); border: 1px solid transparent; transition: background .12s, color .12s, border-color .12s;
}
.gs-tut-item:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.gs-tut-item.is-active {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent); font-weight: 600;
}
.gs-tut-empty { padding: 10px 4px; color: var(--text-secondary, #9aa1ad); font-size: 13px; }
.gs-tut-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.gs-tut-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.gs-tut-cat {
  padding: 7px 14px; border-radius: 999px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--border-color, #e0e2e8); background: var(--bg-primary); color: var(--text-primary);
  transition: background .12s, color .12s, border-color .12s;
}
.gs-tut-cat:hover { border-color: var(--accent); color: var(--accent); }
.gs-tut-cat.is-active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.gs-tut-content {
  background: var(--bg-primary);
  border: 1px solid var(--border-color, #e6e8ec);
  border-radius: 14px;
  padding: 20px 24px;
  line-height: 1.75;
  font-size: 14px;
  color: var(--text-primary);
}
.gs-tut-h { margin: 0 0 14px; font-size: 19px; line-height: 1.3; }
.gs-tut-p { margin: 0 0 12px; color: var(--text-primary); }
.gs-tut-pre {
  margin: 0 0 14px; padding: 12px 14px; border-radius: 10px;
  background: color-mix(in srgb, var(--bg-secondary, #f4f5f7) 80%, #000 0%);
  border: 1px solid var(--border-color, #e6e8ec);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.6; color: var(--text-primary);
  white-space: pre-wrap; word-break: break-all; overflow-x: auto;
}
@media (min-width: 1441px) { .gs-tut-side { width: 240px; } }
@media (max-width: 1023px) {
  .gs-tut { grid-template-columns: 1fr; }
  .gs-tut-side { position: static; }
  .gs-tut-list { max-height: 220px; }
}
@media (max-width: 700px) {
  .gs-tut-content { padding: 16px 14px; }
  .gs-tut-h { font-size: 17px; }
  .gs-tut-side { padding: 12px; }
}
