/* ============================================================
   Plugin Vault — 样式表
   ============================================================ */

:root {
  --bg: #0a0b10;
  --bg-soft: #10121a;
  --panel: #14161f;
  --panel-2: #1a1d28;
  --line: #262a38;
  --line-soft: #1e2130;
  --text: #e9ecf5;
  --text-dim: #9aa1b5;
  --text-faint: #6b7288;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
  --font: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

/* 保证 hidden 属性不会被 .grid / .panel 之类的 display 规则覆盖 */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(760px 420px at 12% -8%, rgba(124, 92, 255, .20), transparent 70%),
    radial-gradient(680px 380px at 88% 4%, rgba(34, 211, 238, .13), transparent 70%);
  z-index: 0;
}

a { color: inherit; text-decoration: none; }

.wrap {
  width: min(1180px, 100% - 40px);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* ---------------- Header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 11, 16, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -.3px;
}

.brand-mark {
  width: 41px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--accent);
  color: #0a0b10;
  font-size: 14.5px;
  font-weight: 900;
  letter-spacing: -.8px;
  text-indent: -.8px;
}

.brand-text {
  font-size: 17.5px;
  font-weight: 800;
}

.site-nav { display: flex; gap: 6px; }

.site-nav a {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-dim);
  transition: background .18s, color .18s;
}

.site-nav a:hover { color: var(--text); background: var(--panel-2); }

.site-nav a.active {
  color: var(--text);
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* ---------------- Hero ---------------- */

.hero {
  padding: 66px 0 38px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 14px;
  /* 换成有真正 900（Black）字重的字体：普通中文字体只有常规/粗体两档 */
  font-family: "Arial Black", "Arial", "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: clamp(28px, 4.4vw, 46px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -.8px;
  background: linear-gradient(100deg, #fff 18%, #b9a8ff 55%, #7fe6f8 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 0 auto 30px;
  max-width: 560px;
  color: var(--text-dim);
  font-size: 15px;
}

.search-box {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 6px 4px 20px;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}

.search-box:focus-within {
  border-color: rgba(124, 92, 255, .75);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, .14), var(--shadow);
}

.search-icon {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: var(--text-faint);
  stroke-width: 2;
  stroke-linecap: round;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  padding: 13px 12px;
}

.search-box input::placeholder { color: var(--text-faint); }

.search-box input::-webkit-search-cancel-button { display: none; }

.clear-btn {
  width: 28px;
  height: 28px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background .16s, color .16s;
}

.clear-btn:hover { background: var(--line); color: var(--text); }

.search-kbd {
  flex: none;
  margin-right: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--text-faint);
}

.search-box:focus-within .search-kbd { opacity: 0; }

.hero-stats {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-faint);
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats b {
  color: var(--text-dim);
  font-weight: 600;
}

/* 解压密码提示 */

.extract-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 22px auto 0;
  padding: 9px 20px;
  border-radius: 999px;
  background: rgba(255, 212, 121, .1);
  border: 1px solid rgba(255, 212, 121, .28);
  color: #ffd479;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
}

.extract-note::before {
  content: "🔑";
  font-size: 14px;
  flex: none;
}

.extract-note-block {
  display: flex;
  width: 100%;
  margin: 0 0 16px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  text-align: left;
  justify-content: flex-start;
}

/* ---------------- Layout ---------------- */

/* 加载失败提示 */
.state-banner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .3);
  color: #ffa8a8;
  font-size: 13.5px;
  line-height: 1.7;
}

.state-banner strong { color: #ffc9c9; }

.state-banner code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: rgba(0, 0, 0, .25);
  border-radius: 5px;
  padding: 1px 6px;
}

/* 加载中的骨架屏：让等待有形状，页面不会突然跳一下 */
.loading-state {
  padding: 6px 0 40px;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 20px;
}

.skeleton-card {
  height: 342px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: linear-gradient(100deg,
    var(--panel) 30%, var(--panel-2) 50%, var(--panel) 70%);
  background-size: 220% 100%;
  animation: skeleton-shine 1.4s ease-in-out infinite;
}

@keyframes skeleton-shine {
  from { background-position: 180% 0; }
  to { background-position: -80% 0; }
}

.skeleton-tip {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-faint);
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-card { animation: none; }
}

.main { padding-bottom: 80px; }

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

.section-head h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.2px;
}

.featured-section { margin-bottom: 48px; }

.filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.chips { display: flex; gap: 7px; flex-wrap: wrap; }

.chip {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all .16s;
}

.chip:hover { color: var(--text); border-color: #39405a; }

.chip.is-active {
  background: linear-gradient(135deg, rgba(124, 92, 255, .9), rgba(34, 211, 238, .75));
  border-color: transparent;
  color: #0a0b10;
  font-weight: 600;
}

.sort-select {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.sort-select:focus { outline: 2px solid rgba(124, 92, 255, .5); outline-offset: 1px; }

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

/* ---------------- Card ---------------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}

/* 整张卡片可点击，同时让里面的标签也能单独点 */
.card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
}

.card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.card:hover {
  transform: translateY(-4px);
  border-color: #343a52;
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #2b2350, #12333d);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.card-cover .card-initials {
  font-size: 34px;
  font-weight: 800;
  color: rgba(255, 255, 255, .16);
  letter-spacing: 2px;
  user-select: none;
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 11, 16, .72), transparent 60%);
}

/* 封面图：懒加载，滚动到附近才下载 */
.card-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-cat {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(10, 11, 16, .68);
  border: 1px solid rgba(255, 255, 255, .1);
  font-size: 13px;
  line-height: 1.6;
  color: #d8dcec;
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 18px;
  flex: 1;
}

.card-name {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
}

.card-name mark,
.detail-name mark {
  background: rgba(124, 92, 255, .28);
  color: #cfc2ff;
  border-radius: 3px;
  padding: 0 2px;
}

.card-vendor {
  font-size: 12.5px;
  color: var(--accent-2);
  letter-spacing: .2px;
}

.card-summary {
  margin: 0;
  font-size: 13.2px;
  color: var(--text-dim);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 卡片上的标签，点击即按该标签搜索 */
.card-tags {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tags .tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(124, 92, 255, .1);
  border: 1px solid rgba(124, 92, 255, .22);
  color: #b8a8ff;
  font-size: 11.5px;
  line-height: 1.7;
  transition: background .16s, border-color .16s, color .16s;
}

.card-tags .tag:hover {
  background: rgba(124, 92, 255, .24);
  border-color: rgba(124, 92, 255, .48);
  color: #d9cfff;
}

.card-tags .tag-more {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--text-faint);
}

.card-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.badges { display: flex; gap: 5px; flex-wrap: wrap; }

.badge {
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: .2px;
}

.card-size { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; }

/* ---------------- Empty / toast ---------------- */

.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--text-dim);
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.empty-state h3 { margin: 0 0 6px; color: var(--text); font-size: 17px; }
.empty-state p { margin: 0 0 20px; font-size: 14px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 20px);
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  z-index: 200;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: transform .14s, background .18s, border-color .18s, opacity .18s;
}

.btn:active { transform: scale(.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5b8cff);
  color: #fff;
  box-shadow: 0 8px 22px rgba(124, 92, 255, .3);
}

.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--text-dim);
}

.btn-ghost:hover { color: var(--text); border-color: #39405a; }

.btn-block { width: 100%; }

/* ---------------- Detail page ---------------- */

.detail-main { padding-top: 30px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 22px;
  transition: color .16s;
}

.back-link:hover { color: var(--text); }

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  align-items: start;
}

.detail-primary { min-width: 0; display: flex; flex-direction: column; gap: 22px; }

.detail-cover {
  aspect-ratio: 21 / 8;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: linear-gradient(135deg, #2b2350, #12333d);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  font-size: 54px;
  font-weight: 800;
  color: rgba(255, 255, 255, .14);
  letter-spacing: 4px;
  user-select: none;
  overflow: hidden;
}

/* 有封面图时：完整显示整张图，不裁切也不放大 */
.detail-cover.has-image {
  aspect-ratio: auto;
  min-height: 0;
  padding: 14px;
  background: #0e1017;
  font-size: 0;
}

.detail-cover.has-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 460px;
  border-radius: 8px;
}

.detail-head { display: flex; flex-direction: column; gap: 10px; }

.detail-badges { display: flex; gap: 7px; flex-wrap: wrap; }

.detail-badges .badge {
  background: rgba(124, 92, 255, .14);
  border-color: rgba(124, 92, 255, .3);
  color: #b8a8ff;
  font-size: 11.5px;
  padding: 3px 9px;
}

.detail-head h1 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.25;
  letter-spacing: -.4px;
}

.detail-vendor { margin: 0; color: var(--accent-2); font-size: 14px; }

.detail-summary {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.7;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px;
}

.panel-title {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--text-faint);
}

.panel-title-spaced { margin-top: 30px; }

.detail-description {
  color: #c3c9db;
  font-size: 14.5px;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
}

.meta-list {
  margin: 0;
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.meta-list > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  background: var(--panel);
}

.meta-list dt { color: var(--text-faint); font-size: 13px; }
.meta-list dd { margin: 0; font-size: 13px; color: var(--text); text-align: right; }

.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }

.tag-list .tag {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-dim);
  transition: all .16s;
}

.tag-list .tag:hover { color: var(--text); border-color: #39405a; }

.side-actions { display: flex; flex-direction: column; gap: 10px; }

/* Download list */

.download-list { display: flex; flex-direction: column; gap: 12px; }

.download-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.download-row-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.download-row-body {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.download-url {
  flex: 1;
  min-width: 220px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-dim);
  word-break: break-all;
  user-select: all;
}

.download-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.btn-sm {
  padding: 7px 15px;
  font-size: 13px;
  border-radius: 8px;
}

.report-btn {
  padding: 7px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text-faint);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: color .16s, border-color .16s, background .16s;
}

.report-btn:hover {
  color: #ffb4b4;
  border-color: rgba(255, 138, 138, .45);
}

.report-btn.is-reported {
  border-style: solid;
  border-color: rgba(52, 211, 153, .3);
  background: rgba(52, 211, 153, .1);
  color: #6ee7b7;
  cursor: pointer;
}

.report-btn.is-reported:hover {
  color: #ffb4b4;
  border-color: rgba(255, 138, 138, .45);
  background: rgba(255, 138, 138, .1);
}

.download-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.download-label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  flex: none;
}

.download-code {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  font-size: 12.5px;
  color: var(--text-faint);
}

.download-code code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  color: #ffd479;
  background: rgba(255, 212, 121, .09);
  border: 1px solid rgba(255, 212, 121, .22);
  padding: 2px 8px;
  border-radius: 5px;
  letter-spacing: .5px;
}

.code-copy {
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 5px;
  transition: color .16s, background .16s;
}

.code-copy:hover { color: var(--text); background: var(--line); }

.download-hint {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--text-faint);
}

/* 历史版本 */

.version-current {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(52, 211, 153, .13);
  border: 1px solid rgba(52, 211, 153, .3);
  color: #6ee7b7;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  vertical-align: middle;
}

.version-total {
  margin-left: 6px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-faint);
}

.version-hint {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-faint);
}

.version-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.version-item {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color .18s;
}

.version-item:hover { border-color: #39405a; }

.version-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 16px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  transition: background .16s;
}

.version-item summary::-webkit-details-marker { display: none; }
.version-item summary:hover { background: #1f2331; }

.version-label { font-weight: 650; }
.version-date { font-size: 12.5px; color: var(--text-faint); }

.version-size {
  padding: 1px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-dim);
}

.version-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-faint);
}

.version-chevron {
  color: var(--text-faint);
  font-size: 11px;
  transition: transform .2s;
}

.version-item[open] .version-chevron { transform: rotate(180deg); }

.version-body {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line-soft);
}

.version-note {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
}

.version-body .version-note:last-child { margin-bottom: 0; }

.related-section { margin-top: 54px; }

/* ---------------- Publish page ---------------- */

.publish-main { padding-top: 38px; }

.publish-head { margin-bottom: 26px; max-width: 760px; }

.publish-head h1 { margin: 0 0 10px; font-size: 27px; letter-spacing: -.3px; }

.publish-head p { margin: 0; color: var(--text-dim); font-size: 14.5px; }

.publish-head code,
.output-steps code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  color: #b8a8ff;
}

.publish-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 24px;
  align-items: start;
}

.publish-form { display: flex; flex-direction: column; gap: 16px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field { display: flex; flex-direction: column; gap: 7px; }

.field-label { font-size: 13px; color: var(--text-dim); }
.field-label em { color: var(--accent-3); font-style: normal; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 13px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: 0;
  transition: border-color .18s, box-shadow .18s;
}

.field textarea { resize: vertical; line-height: 1.65; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(124, 92, 255, .7);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, .13);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }

.field-check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-dim);
}

.field-check input { width: 17px; height: 17px; accent-color: var(--accent); }

.download-rows { display: flex; flex-direction: column; gap: 12px; }

.download-row-edit {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.6fr .7fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.download-row-edit input {
  width: 100%;
  padding: 8px 11px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: 0;
}

.download-row-edit input:focus { border-color: rgba(124, 92, 255, .7); }

.row-remove {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text-faint);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: all .16s;
}

.row-remove:hover { color: #ff8a8a; border-color: rgba(255, 138, 138, .4); }

.btn-add { align-self: flex-start; }

.publish-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.publish-output { position: sticky; top: 86px; }

.output-hint { margin: 0 0 12px; font-size: 13px; color: var(--text-faint); }

.output-code {
  width: 100%;
  padding: 14px;
  background: #0c0e14;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: #9fe8c8;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  resize: vertical;
  outline: 0;
}

.output-steps {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.output-steps h3 { margin: 0 0 10px; font-size: 14px; }

.output-steps ol {
  margin: 0;
  padding-left: 20px;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.9;
}

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 30px 0 40px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
}

.site-footer p { margin: 0 0 6px; }

.footer-note { font-size: 12px; color: #565d72; }

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .publish-layout { grid-template-columns: 1fr; }
  .publish-output { position: static; }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 28px); }
  .hero { padding: 42px 0 28px; }
  .hero-sub { font-size: 14px; }
  .search-box { padding-left: 16px; }
  .search-kbd { display: none; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .field-row { grid-template-columns: 1fr; }
  .download-row-edit { grid-template-columns: 1fr 1fr; }
  .download-row-edit .row-remove { justify-self: end; }
  .section-head { align-items: flex-start; }
  .filters { width: 100%; }
  .detail-cover { aspect-ratio: 16 / 9; }
  .download-code { margin-left: 0; width: 100%; }
}
