/* 工坊页面（创意工坊能力页） */
.ws-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}
.ws-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.ws-kicker {
  color: var(--text-dim, #9aa6d4);
  font-size: 13px;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
}
.ws-head h1 {
  font-size: clamp(24px, 3.4vw, 34px);
  margin: 0 0 8px;
}
.ws-sub {
  color: var(--text-dim, #9aa6d4);
  font-size: 14px;
  margin: 0;
  max-width: 640px;
  line-height: 1.6;
}
.ws-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ws-hint {
  color: var(--text-dim, #9aa6d4);
  font-size: 13px;
  line-height: 1.6;
  margin: 14px 0 0;
}
.ws-link { color: var(--accent, #7aa2ff); }

/* hub */
.ws-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 8px;
}
.ws-hub-card {
  display: block;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--border, #22305c);
  background: var(--surface, rgba(17, 24, 48, 0.66));
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.ws-hub-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent, #5b7cff);
}
.ws-hub-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(91, 124, 255, 0.16);
  margin-bottom: 12px;
}
.ws-hub-icon .icon { width: 22px; height: 22px; }
.ws-hub-card h2 { margin: 0 0 8px; font-size: 19px; }
.ws-hub-card p { color: var(--text-dim, #9aa6d4); font-size: 14px; line-height: 1.7; margin: 0 0 14px; }
.ws-hub-link { color: var(--accent, #7aa2ff); font-weight: 600; font-size: 14px; }

/* split editor */
.ws-split {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.ws-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 84px;
}
.ws-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border, #22305c);
  background: var(--surface, rgba(17, 24, 48, 0.66));
  color: inherit;
  cursor: pointer;
}
.ws-item.is-active { border-color: var(--accent, #5b7cff); background: rgba(91, 124, 255, 0.12); }
.ws-item-name { font-weight: 600; font-size: 14px; }
.ws-item-meta { color: var(--text-dim, #9aa6d4); font-size: 11px; }
.ws-list-foot { display: flex; gap: 8px; margin-top: 6px; }
.ws-editor {
  min-height: 320px;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border, #22305c);
  background: var(--surface, rgba(17, 24, 48, 0.66));
}
.ws-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.ws-editor-head h2 { margin: 0; font-size: 18px; }
.ws-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.ws-span2 { grid-column: 1 / -1; }
.ws-field { display: flex; flex-direction: column; gap: 6px; }
.ws-label { font-size: 13px; color: var(--text-dim, #9aa6d4); }
.ws-label small { display: block; font-size: 11px; opacity: 0.75; margin-top: 2px; }
.ws-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border, #22305c);
  background: rgba(5, 8, 17, 0.55);
  color: inherit;
  font-size: 14px;
  font-family: inherit;
}
.ws-input:focus { outline: 2px solid rgba(91, 124, 255, 0.5); outline-offset: 1px; }
textarea.ws-input { resize: vertical; line-height: 1.5; }
.ws-json { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.ws-select { max-width: 160px; }
.ws-empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--text-dim, #9aa6d4);
  font-size: 14px;
  line-height: 1.8;
  border: 1px dashed var(--border, #22305c);
  border-radius: 14px;
}
.ws-empty-actions { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.ws-error { color: #ffb4b4; }

/* workshop market */
.ws-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}
.ws-filter .ws-input { max-width: 320px; }
.ws-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.ws-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border, #22305c);
  background: var(--surface, rgba(17, 24, 48, 0.66));
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
}
.ws-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ws-card-top h3 { margin: 0; font-size: 15px; }
.ws-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border, #22305c);
  color: var(--text-dim, #9aa6d4);
  white-space: nowrap;
}
.ws-card-desc {
  margin: 0;
  color: var(--text-dim, #9aa6d4);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ws-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim, #9aa6d4);
  flex-wrap: wrap;
}
.ws-card-actions { display: flex; gap: 4px; }
.ws-danger { color: #ff9b9b; }
.ws-more { text-align: center; margin-top: 18px; }
.ws-pre {
  max-height: 46vh;
  overflow: auto;
  padding: 12px;
  border-radius: 10px;
  background: rgba(5, 8, 17, 0.6);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.ws-share-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 30px;
  letter-spacing: 0.18em;
  text-align: center;
  margin: 14px 0;
  color: var(--accent, #7aa2ff);
}

@media (max-width: 860px) {
  .ws-split { grid-template-columns: 1fr; }
  .ws-list { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .ws-item { min-width: 190px; }
  .ws-list-foot { flex-direction: column; margin-top: 0; }
  .ws-page { padding: 22px 14px 48px; }
  .ws-head { align-items: flex-start; }
}

/* ================= 创意工坊：分类筛选 / 封面 / 发布向导（2026-11-02） ================= */
.ws-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.ws-cat {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim, #9aa6d4);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.ws-cat:hover { border-color: rgba(255, 193, 77, 0.5); color: #f0e6d2; }
.ws-cat.is-active {
  color: #ffe2a8;
  border-color: rgba(255, 193, 77, 0.75);
  background: linear-gradient(135deg, rgba(255, 193, 77, 0.22), rgba(255, 139, 61, 0.14));
  box-shadow: 0 0 0 1px rgba(255, 193, 77, 0.22), 0 4px 14px rgba(255, 153, 61, 0.16);
}

.ws-card--cover { padding-top: 0; overflow: hidden; }
.ws-card-cover { margin: -1px -16px 12px; aspect-ratio: 16 / 7; overflow: hidden; background: #0d0f16; }
.ws-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-card-badges { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ws-badge--cat {
  color: #ffe2a8;
  border-color: rgba(255, 193, 77, 0.42);
  background: rgba(255, 193, 77, 0.12);
}
.ws-detail-cover { margin: 0 0 12px; border-radius: 12px; overflow: hidden; max-height: 260px; background: #0d0f16; }
.ws-detail-cover img { width: 100%; max-height: 260px; object-fit: cover; display: block; }

/* 四步发布向导 */
.pub-wizard { display: flex; flex-direction: column; gap: 14px; }
.pub-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.pub-steps li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-dim, #9aa6d4);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.pub-steps li b {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
}
.pub-steps li.is-active {
  color: #ffe2a8;
  border-color: rgba(255, 193, 77, 0.55);
  background: rgba(255, 193, 77, 0.1);
}
.pub-steps li.is-active b { background: #ffc14d; color: #2a1600; }
.pub-steps li.is-done { color: #9fe0b0; border-color: rgba(100, 220, 150, 0.3); }
.pub-step { min-height: 216px; }
.pub-worlds { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow: auto; padding-right: 4px; }
.pub-world {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.16s ease, background 0.16s ease;
}
.pub-world:hover { border-color: rgba(255, 193, 77, 0.45); }
.pub-world:has(input:checked) {
  border-color: rgba(255, 193, 77, 0.8);
  background: rgba(255, 193, 77, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 193, 77, 0.2);
}
.pub-world input { margin-top: 3px; accent-color: #ffc14d; }
.pub-world-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pub-world-main strong { font-size: 13.5px; color: var(--text, #e9edff); }
.pub-world-main small {
  color: var(--text-dim, #9aa6d4);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 520px;
}

.pub-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pub-cat {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  cursor: pointer;
  font-size: 14px;
  color: var(--text-dim, #9aa6d4);
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.pub-cat:hover { border-color: rgba(255, 193, 77, 0.45); color: #f0e6d2; }
.pub-cat:has(input:checked) {
  border-color: rgba(255, 193, 77, 0.8);
  color: #ffe2a8;
  background: linear-gradient(135deg, rgba(255, 193, 77, 0.18), rgba(255, 139, 61, 0.1));
  box-shadow: 0 4px 18px rgba(255, 153, 61, 0.18);
}
.pub-cat input { position: absolute; opacity: 0; pointer-events: none; }

.pub-desc { min-height: 92px; resize: vertical; }
.pub-cover-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.pub-cover-pick { flex: 1 1 240px; }
.pub-file { display: block; margin-top: 6px; color: var(--text-dim, #9aa6d4); font-size: 12px; }
.pub-cover-preview { display: flex; flex-direction: column; gap: 8px; }
.pub-cover-preview img { max-width: 220px; max-height: 140px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.12); object-fit: cover; }
.pub-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 2px; }
.pub-summary { display: flex; flex-direction: column; gap: 8px; }
.pub-summary-row {
  display: flex;
  gap: 12px;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.pub-summary-row span { flex: 0 0 52px; color: var(--text-dim, #9aa6d4); }
.pub-summary-row strong { color: var(--text, #e9edff); font-weight: 600; }
.pub-summary-cover img { max-width: 100%; max-height: 180px; object-fit: cover; border-radius: 12px; }
@media (max-width: 720px) {
  .pub-cats { grid-template-columns: 1fr 1fr; }
}
.is-hidden { display: none !important; }
