:root { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
body { margin: 0; background: #f6f7f9; color: #111; }
.wrap { max-width: 1100px; margin: 24px auto; padding: 0 16px; }

.nav{
  display:flex;
  gap:10px;
  margin-bottom: 14px;
}
.navLink{
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 999px;
  text-decoration: none;
  color:#111;
  background:#fff;
}
.navLink.active{
  border-color:#111;
  font-weight: 600;
}

.card { background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 1px 8px rgba(0,0,0,.06); margin-bottom: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
label { font-weight: 600; }
input { padding: 10px 12px; border: 1px solid #ddd; border-radius: 10px; min-width: 260px; }
button { padding: 10px 12px; border: 1px solid #ddd; border-radius: 10px; background: #fff; cursor: pointer; }
button.primary { background: #111; color: #fff; border-color: #111; }
button:disabled { opacity: .6; cursor: not-allowed; }
.hidden { display: none; }
.muted { color: #666; margin-top: 10px; }
.small { font-size: 13px; color: #444; }
.actions { margin-top: 8px; display:flex; gap:8px; flex-wrap:wrap; }

textarea { width: 100%; min-height: 160px; border-radius: 10px; border: 1px solid #ddd; padding: 10px; }
pre { white-space: pre-wrap; }

.previewText{
  white-space: pre-line;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fafafa;
}

.btnLink{
  display:inline-block;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background:#fff;
  text-decoration:none;
  color:#111;
}

.promptSelectList{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
@media (max-width: 800px){
  .promptSelectList{ grid-template-columns: 1fr; }
}
.pSelItem{
  border:1px solid #eee;
  border-radius: 10px;
  padding: 10px;
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.pSelItem input{ min-width: unset; }
.pSelMeta .title{ font-weight:600; }
.pSelMeta .id{ font-size: 12px; color:#666; margin-top:2px; }

.result { border: 1px solid #eee; border-radius: 12px; padding: 12px; margin: 10px 0; }
.result h3 { margin: 0 0 6px 0; }
.badge { display:inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; border: 1px solid #ddd; margin-left: 8px; }
.badge.ok { border-color: #b7f0c7; background:#effdf3; }
.badge.err { border-color: #ffd0d0; background:#fff2f2; }

.tabs{
  display:flex;
  gap:8px;
  margin-top: 10px;
}
.tabBtn{
  padding: 6px 10px;
  border:1px solid #ddd;
  border-radius: 999px;
  background:#fff;
  cursor:pointer;
  font-size: 13px;
}
.tabBtn.active{
  border-color:#111;
  font-weight:600;
}

.htmlPreview{
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 12px;
  background: #fafafa;
  margin-top: 10px;
}
.copyBtn{
  margin-left:auto;
}

.pmGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 10px;
}
#promptList .pItem{
  border:1px solid #eee;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  cursor: pointer;
}
#promptList .pItem.active{
  border-color:#111;
}
.chk{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight: 500;
  margin: 8px 0;
}
#pmId,#pmTitle,#pmModel{ width:100%; min-width: unset; }
