/* 工坊模块卡片：首页与工坊首页共用（数据来自 /tools.json 的 workshop） */
.ybws-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 16px;
}

.ybws-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.ybws-card:hover { border-color: var(--accent-sec); transform: translateY(-2px); box-shadow: var(--shadow); }

.ybws-card__head { display: flex; align-items: flex-start; gap: 12px; }
.ybws-card__icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(4, 120, 87, .09);
  color: var(--accent);
}
.ybws-card__icon svg { width: 22px; height: 22px; }
.ybws-card__title { min-width: 0; }
.ybws-card__title h2,
.ybws-card__title h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.3;
}
.ybws-card__title a { color: inherit; text-decoration: none; }
.ybws-card__title a:hover { color: var(--accent); }
.ybws-card__count {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
}

.ybws-card__sum { font-size: 14px; color: var(--muted-fg); line-height: 1.6; }

.ybws-card__entries {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ybws-card__entries li { display: inline-flex; align-items: center; gap: 4px; }
.ybws-card__entries a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--fg);
  text-decoration: none;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.ybws-card__entries a:hover { border-color: var(--accent); color: var(--accent); }
.ybws-card__lock {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(4, 120, 87, .08);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
}

.ybws-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted-fg);
}
.ybws-card__note { min-width: 0; flex: 1 1 auto; }
.ybws-card__go { flex: none; white-space: nowrap; font-family: inherit; letter-spacing: 0; }

.ybws-empty {
  padding: 28px 20px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: var(--card);
  font-size: 14px;
  color: var(--muted-fg);
}
.ybws-empty a { color: var(--accent); }

@media (min-width: 640px) {
  .ybws-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .ybws-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .ybws-card { transition: none; }
  .ybws-card:hover { transform: none; }
}

/* noscript 兜底：首页与工坊首页共用 */
.ybws-fallback {
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted-fg);
}
.ybws-fallback ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.ybws-fallback a { color: var(--accent); }
