/* Prompt Market Skin (PromptLib-like) */
/* NOTE: Font family is controlled by the theme. */

.pm-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px;
}

.pm-top {
  display: flex;
  flex-direction: column;
  gap: 17px;
  margin-bottom: 18px;
}

.pm-header {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.pm-board-title {
  font-weight: 800;
  font-size: 22px;
}

.pm-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pm-search {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pm-search-input {
  flex: 1;
  height: 48px;
  border: 1px solid #e8eaf0;
  border-radius: 14px;
  padding: 0 16px;
  background: #fff;
  outline: 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
}

.pm-search-input:focus {
  border-color: #c7b9ff;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, .10);
}

.pm-search-btn {
  height: 48px;
  padding: 0 16px;
  border: 1px solid #e8eaf0;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.pm-search-btn:hover {
  border-color: #d8dcf0;
  background: #fafbff;
}

.pm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pm-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #e8eaf0;
  background: #fff;
  color: #303549;
  text-decoration: none;
  font-size: 13px;
}

.pm-pill:hover {
  background: #f6f7ff;
  border-color: #dfe3f5;
}

.pm-pill.is-active {
  background: rgba(124, 58, 237, .10);
  border-color: rgba(124, 58, 237, .35);
  color: #5b21b6;
}
.mb-pill-cnt {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #e5e7eb; color: #374151;
  font-size: 11px; font-weight: 700;
}
.pm-pill.is-active .mb-pill-cnt { background: rgba(124, 58, 237, .2); color: #5b21b6; }

.pm-pill .pm-count {
  opacity: .6;
  font-size: 12px;
}

.pm-filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pm-filters-left {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pm-filters-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.pm-pill-primary {
  background: #111827;
  color: #fff;
  border-color: rgba(0, 0, 0, .08);
}

.pm-pill-primary:hover {
  opacity: .92;
}

.pm-pill-ghost {
  background: #fff;
  color: #111827;
  border-color: #e8eaf0;
}

.pm-pill-ghost:hover {
  border-color: #d8dcf0;
  background: #fafbff;
}

/* Write: Tag recommendation panel (right side) */
.pm-tag-grid {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.pm-tag-main {
  flex: 1;
  min-width: 0;
}

.pm-tag-suggest {
  width: 280px;
  min-width: 260px;
  border: 1px solid #eef0f6;
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}

.pm-tag-suggest-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.pm-tag-suggest-title {
  font-size: 13px;
  font-weight: 800;
  color: #111827;
}

.pm-tag-suggest-sub {
  font-size: 12px;
  color: #64748b;
  line-height: 1.3;
}

.pm-tag-suggest-pills {
  gap: 6px;
}

.pm-cap-grid {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.pm-cap-main {
  flex: 1;
  min-width: 0;
}

.pm-cap-suggest {
  width: 260px;
  min-width: 240px;
  border: 1px solid #eef0f6;
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}

.pm-cap-suggest-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.pm-cap-suggest-title {
  font-size: 13px;
  font-weight: 800;
  color: #111827;
}

.pm-cap-suggest-sub {
  font-size: 12px;
  color: #64748b;
  line-height: 1.3;
}

.pm-cap-suggest-pills {
  gap: 6px;
}

.pm-cap-suggest-pill {
  height: 32px;
  padding: 0 10px;
  font-size: 12.5px;
}

@media (max-width: 860px) {
  .pm-cap-grid {
    flex-direction: column;
  }

  .pm-cap-suggest {
    width: 100%;
    min-width: 0;
  }
}

.pm-tag-suggest-pill {
  height: 32px;
  padding: 0 10px;
  font-size: 12.5px;
}

@media (max-width: 860px) {
  .pm-tag-grid {
    flex-direction: column;
  }

  .pm-tag-suggest {
    width: 100%;
    min-width: 0;
  }
}

.pm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1020px) {
  .pm-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .pm-grid {
    grid-template-columns: 1fr;
  }
}

.pm-card {
  display: block;
  text-decoration: none;
  color: #0f172a;
  background: #fff;
  border: 1px solid #eef0f6;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  min-height: 170px;
}

.pm-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
  border-color: #e2e6f3;
}

.pm-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.pm-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #334155;
}

.pm-badge-cat {
  background: #fff;
  border-color: #e5e7eb;
  color: #111827;
}

.pm-badge-cat:before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--pm-cat, #7c3aed);
  display: inline-block;
  margin-right: 6px;
}

/* Benchmark-like outline pills */
.pm-badge-free {
  background: #fff;
  border-color: #34d399;
  color: #059669;
}

.pm-badge-member {
  background: #fff;
  border-color: #60a5fa;
  color: #9333EA;
}

.pm-badge-paid {
  background: #fff7ed;
  border-color: #fb923c;
  color: #9a3412;
}

.pm-badge-paid:before {
  content: "";
}

.pm-badge-featured {
  background: #fff;
  border-color: #a78bfa;
  color: #7c3aed;
}

.pm-badge-featured:before {
  content: '✦';
  font-size: 12px;
  margin-right: 6px;
  line-height: 1;
}

.pm-badge-mode {
  background: #fff;
  border-color: #e5e7eb;
  color: #475569;
}

.pm-badge-mode:before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #94a3b8;
  display: inline-block;
  margin-right: 6px;
}

.pm-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #eef0f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pm-dot-paid {
  background: #fff7ed;
  border-color: #fed7aa;
}

.pm-dot-featured {
  background: rgba(124, 58, 237, .12);
  border-color: rgba(124, 58, 237, .35);
}

.pm-badge-icons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pm-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
}

.pm-icon svg {
  width: 14px;
  height: 14px;
}

.pm-icon-featured {
  background: #fff;
  border-color: #a78bfa;
  color: #7c3aed;
}

.pm-icon-paid {
  background: #fff;
  border-color: #34d399;
  color: #059669;
}

.pm-icon-member {
  background: #fff;
  border-color: #60a5fa;
  color: #9333EA;
}


.pm-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 10px 0;
}

.pm-summary {
  font-size: 13px;
  line-height: 1.45;
  color: #475569;
  min-height: 38px;
  margin: 0 0 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* List prompt excerpt (benchmark-like gray box) */
.pm-prompt-box {
  margin-top: 0px;
  padding: 12px 13px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 12.5px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* List footer: tags (left) + stats (right) in a single line */
.pm-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pm-footer-left {
  min-width: 0;
}

.pm-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: #64748b;
  font-size: 12px;
}

.pm-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pm-stat-ico {
  font-size: 12px;
  line-height: 1;
}

.pm-caps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.pm-cap {
  height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  background: #f1f5ff;
  border: 1px solid #e3eaff;
  color: #1e3a8a;
}

.pm-cap-more {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

.pm-meta {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  color: #64748b;
  font-size: 12px;
}

.pm-paging {
  margin-top: 22px;
  display: flex;
  justify-content: center;
}

.pm-paging .pg_wrap {
  margin: 0;
}

.pm-paging .pg {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.pm-paging .pg a,
.pm-paging .pg strong {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid #e8eaf0;
  background: #f4f6fb;
  color: #334155;
  text-decoration: none;
}

.pm-paging .pg a:hover {
  background: #eef2ff;
  border-color: #dfe3f5;
}

.pm-paging .pg strong {
  background: rgba(124, 58, 237, .12);
  border-color: rgba(124, 58, 237, .35);
  color: #5b21b6;
  font-weight: 700;
}

/* View (modal-like page) */
.pm-view-overlay {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px;
}

.pm-view {
  position: relative;
  background: #fff;
  border: 1px solid #eef0f6;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .10);
  padding: 22px;
}

/* In iframe modal mode, the surrounding panel already provides the card.
   Remove the extra inner white card so the title/button area doesn't look boxed. */
.pm-view.is-modal {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

.pm-close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #eef0f6;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #0f172a;
  background: #fff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.pm-close:hover {
  background: #f6f7ff;
  border-color: #dfe3f5;
}

.pm-view-head {
  padding-bottom: 14px;
  border-bottom: 1px solid #eef0f6;
  margin-bottom: 14px;
}

.pm-view-body {
  padding: 0;
}

/* Modal: unify horizontal gutter so header and all sections align */
.pm-view.is-modal .pm-view-pad {
  padding-left: 0;
  padding-right: 0;
}

.pm-view.is-modal .pm-view-head,
.pm-view.is-modal .pm-view-body {
  padding-left: 22px;
  padding-right: 22px;
}

.pm-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.pm-h2 {
  margin: 0 0 8px 0;
  font-size: 22px;
  line-height: 1.25;
}

.pm-desc {
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

.pm-text-body {
  font-size: 13px;
  line-height: 1.7;
  color: #0f172a;
}

.pm-text-body a {
  font-size: 13px;
}

.pm-section {
  margin-top: 14px;
}

.pm-section-title {
  font-size: 12px;
  letter-spacing: .08em;
  color: #64748b;
  font-weight: 800;
  margin-bottom: 8px;
}

.pm-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.pm-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pm-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #eef0f6;
  background: #fafbff;
  color: #334155;
}

.pm-chip-blue {
  background: #eef2ff;
  border-color: #dbe3ff;
  color: #1e3a8a;
}

.pm-starter {
  border: 1px solid #eef0f6;
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  margin-top: 8px;
  color: #334155;
}

.pm-si {
  border: 1px solid #eef0f6;
  border-radius: 16px;
  background: #0b1020;
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.pm-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #e5e7eb;
  font-size: 13px;
  line-height: 1.55;
}

.pm-mini-copy {
  height: 30px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #e8eaf0;
  background: #fff;
  cursor: pointer;
}

.pm-mini-copy:hover {
  background: #fafbff;
  border-color: #dfe3f5;
}

.pm-pre-blur {
  filter: blur(7px);
  user-select: none;
}

.pm-lock-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px;
  text-align: center;
  background: rgba(255, 255, 255, .92);
}

.pm-lock-ico {
  font-size: 34px;
  margin-bottom: 10px;
}

.pm-lock-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
  color: #0f172a;
}

.pm-lock-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
  margin-bottom: 12px;
  max-width: 520px;
}

.pm-login {
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  text-decoration: none;
}

.pm-login:hover {
  opacity: .92;
}

.pm-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.pm-updated {
  color: #64748b;
  font-size: 12px;
}

.pm-copy {
  height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  background: #111827;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pm-copy:hover {
  opacity: .92;
}

.pm-copy-locked {
  background: #111827;
  color: #fff;
}

/* Write */
.pm-write {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px;
}

.pm-form {
  /* 리스트 카드(.pm-card)와 시각적 일관성 유지 */
  background: #fff;
  border: 1px solid #e6e8f0;
  border-radius: 18px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .03), 0 10px 30px rgba(30, 30, 60, .06);
  padding: 22px;
}

.pm-form h2 {
  margin: 0 0 14px 0;
}

.pm-grid2 {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px 14px;
  align-items: center;
}

@media (max-width:720px) {
  .pm-grid2 {
    grid-template-columns: 1fr;
  }
}

.pm-label {
  font-weight: 800;
  color: #334155;
  font-size: 13px;
}

.pm-input,
.pm-select,
.pm-textarea {
  width: 100%;
  border: 1px solid #e8eaf0;
  border-radius: 14px;
  padding: 12px 14px;
  outline: 0;
  background: #fff;
}

.pm-textarea {
  min-height: 220px;
  resize: vertical;
}

.pm-input:focus,
.pm-select:focus,
.pm-textarea:focus {
  border-color: #c7b9ff;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, .10);
}

.pm-help {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
}

.pm-section-box {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #eef0f6;
  border-radius: 16px;
  background: #fff;
}

.pm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
  flex-wrap: wrap;
}

.pm-btn {
  height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid #e8eaf0;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.pm-btn:hover {
  background: #fafbff;
  border-color: #dfe3f5;
}

.pm-btn-primary {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.pm-btn-primary:hover {
  opacity: .92;
}

.pm-kv {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.pm-radio {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.pm-mode-write {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.pm-mode-write input[type=radio] {
  accent-color: #7c3aed;
}

.pm-small {
  font-size: 12px;
  color: #64748b;
}

/* Presets */
.pm-preset-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pm-preset {
  display: inline-flex;
  align-items: center;
}

.pm-preset input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pm-preset span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #e8eaf0;
  background: #fff;
  color: #303549;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.pm-preset span:before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #cbd5e1;
  display: inline-block;
}

.pm-preset input:checked+span {
  background: rgba(124, 58, 237, .10);
  border-color: rgba(124, 58, 237, .35);
  color: #5b21b6;
}

.pm-preset input:checked+span:before {
  background: #7c3aed;
}

.pm-preset span:hover {
  background: #f6f7ff;
  border-color: #dfe3f5;
}

.pm-preset-limit {
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
}

/* Tag preset groups + top suggestions (v1.5) */
.pm-reco-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.pm-reco {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #e8eaf0;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.pm-reco:hover {
  background: #f6f7ff;
  border-color: #dfe3f5;
}

.pm-tag-groups {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.pm-tag-group {
  border: 1px solid #e8eaf0;
  border-radius: 16px;
  background: #fff;
  padding: 10px 12px;
}

.pm-tag-group summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  color: #111827;
  list-style: none;
}

.pm-tag-group summary::-webkit-details-marker {
  display: none;
}

.pm-tag-group summary:after {
  content: "▾";
  float: right;
  color: #94a3b8;
}

.pm-tag-group[open] summary:after {
  content: "▴";
}

.pm-tag-group .pm-preset-wrap {
  margin-top: 10px;
}

.pm-inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.pm-badge-mini {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #e8eaf0;
  background: #fff;
  color: #64748b;
  font-size: 12px;
}



.pm-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 26px 8px 18px;
  margin-bottom: 12px;
}

.pm-hero-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
  box-shadow: 0 12px 26px rgba(124, 58, 237, .22);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}

.pm-hero-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}

.pm-hero-sub {
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 10px;
}

.pm-hero-sub b {
  color: #7c3aed;
}

.pm-hero-desc {
  max-width: 820px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.pm-hero-modes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 14px;
}

.pm-mode {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #e8eaf0;
  background: #fff;
  color: #111827;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}

.pm-mode:hover {
  border-color: #d7d2ff;
  background: #fbfaff;
}

.pm-mode.is-active {
  background: #f1eaff;
  border-color: #d7c6ff;
  color: #5b21b6;
}

.pm-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.pm-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid rgba(0, 0, 0, .08);
}

.pm-btn-primary:hover {
  opacity: .92;
}

.pm-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 14px;
  background: #fff;
  color: #111827;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid #e8eaf0;
}

.pm-btn-ghost:hover {
  border-color: #d8dcf0;
  background: #fafbff;
}

.pm-chipbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2px;
}

.pm-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pm-chip:hover {
  border-color: #d1d5db;
  background: #fbfbfd;
}

.pm-chip.is-active {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 22px rgba(124, 58, 237, .20);
}

.pm-chip-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: #6b7280;
}

.pm-chip-ico svg {
  width: 16px;
  height: 16px;
  display: block;
}

.pm-chip.is-active .pm-chip-ico {
  color: #fff;
}

.pm-chip-label {
  line-height: 1;
}

.pm-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  min-width: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef0f6;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.pm-chip.is-active .pm-chip-count {
  background: rgba(255, 255, 255, .22);
  color: #fff;
}

.pm-chip.has-color:before {
  display: none;
}

.pm-tagbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.pm-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid #e8eaf0;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.pm-tag:hover {
  border-color: #d8dcf0;
  background: #fafbff;
}

.pm-tag.is-active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.pm-tag-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #e3e7ff;
}

.pm-tag.is-active .pm-tag-count {
  background: rgba(255, 255, 255, .18);
  color: #fff;
  border-color: rgba(255, 255, 255, .25);
}

.pm-empty {
  border: 1px solid #eef0f6;
  background: #fff;
  border-radius: 18px;
  padding: 28px;
  text-align: center;
}

.pm-empty-title {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 6px;
}

.pm-empty-desc {
  color: #6b7280;
  margin-bottom: 16px;
}

.pm-bottom-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}

/* VIEW TOPBAR */
.pm-view-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pm-topbtn {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #e8eaf0;
  background: #fff;
  text-decoration: none;
  color: #111827;
  font-weight: 800;
  font-size: 12px;
}

.pm-topbtn:hover {
  border-color: #d8dcf0;
  background: #fafbff;
}

.pm-topbtn-primary {
  background: #111827;
  color: #fff;
  border-color: rgba(0, 0, 0, .08);
}

.pm-topbtn-primary:hover {
  opacity: .92;
}

.pm-topbtn-danger {
  border-color: #ffd1d1;
  color: #b91c1c;
  background: #fff5f5;
}

.pm-topbtn-danger:hover {
  background: #ffecec;
}

.pm-topbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}


/* Tooltip / notes */
.pm-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border: 1px solid #e8eaf0;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  color: #64748b;
  cursor: help;
  user-select: none;
}

.pm-tip:hover {
  background: #f6f7fb;
}

.pm-note {
  border: 1px dashed #e8eaf0;
  background: #fbfcff;
  border-radius: 14px;
  padding: 12px 14px;
  color: #475569;
  font-size: 13px;
}


/* Tooltip */
.pm-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .12);
  font-size: 12px;
  color: #6b7280;
  cursor: help;
  position: relative;
  background: #fff;
  user-select: none;
}

.pm-tip:hover,
.pm-tip:focus {
  border-color: rgba(0, 0, 0, .22);
  color: #111827;
  outline: none;
}

.pm-tip:hover::after,
.pm-tip:focus::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%);
  /* absolute 요소의 shrink-to-fit 때문에 폭이 너무 좁아지는 현상 방지 */
  display: block;
  width: 320px !important;
  min-width: 280px !important;
  max-width: 85vw !important;
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
  writing-mode: horizontal-tb;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(17, 24, 39, .96);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  z-index: 50;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}

.pm-tip:hover::before,
.pm-tip:focus::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: rgba(17, 24, 39, .96);
  z-index: 51;
}


/* File box */
.pm-filebox {
  border: 1px dashed rgba(0, 0, 0, .18);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}

.pm-filebox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pm-filebox-title {
  font-weight: 700;
}

.pm-filebox-sub {
  color: #6b7280;
  font-size: 12px;
}

.pm-file-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(0, 0, 0, .06);
}

.pm-file-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.pm-file-input {
  flex: 1 1 260px;
  font-size: 14px;
}

.pm-file-existing {
  flex: 1 1 220px;
  color: #6b7280;
  font-size: 12px;
  display: flex;
  align-items: center;
}

.pm-file-del {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #374151;
  margin-left: auto;
}


/* Spacing helpers */
.pm-stack-gap {
  margin-top: 14px;
}


/* List stats: line icons (no emoji, no circle) */
.pm-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 13px;
}

.pm-stat-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pm-stat-ico svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Benchmark-like modal overlay (list -> view) */
.pm-view-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.pm-view-modal.is-open {
  display: block;
}

.pm-view-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
}

.pm-view-modal__panel {
  position: relative;
  max-width: 980px;
  width: min(980px, calc(100% - 48px));
  height: min(90vh, 820px);
  margin: 5vh auto 0;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 70px rgba(2, 6, 23, .35);
  overflow: hidden;
}

.pm-view-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pm-view-modal__close:hover {
  background: #f8fafc;
}

.pm-view-modal__frame {
  position: absolute;
  inset: 52px 0 0 0;
  width: 100%;
  height: calc(100% - 52px);
  border: 0;
}

html.pm-modal-open {
  overflow: hidden;
}

body.pm-modal-open {
  overflow: hidden;
}

/* lock hint + tooltip */
.pm-lockhint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.pm-lockhint-ico svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pm-tooltip {
  position: relative;
}

.pm-tooltip[data-tip]:hover:after,
.pm-tooltip[data-tip]:focus:after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #111827;
  color: #fff;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  z-index: 50;
}

.pm-tooltip[data-tip]:hover:before,
.pm-tooltip[data-tip]:focus:before {
  content: '';
  position: absolute;
  top: calc(100% + 2px);
  right: 10px;
  border: 6px solid transparent;
  border-bottom-color: #111827;
  z-index: 51;
}


/* Modal-only view tweaks (keep theme CSS context) */
.pm-modal-only #pm_view_root {
  max-width: none;
}

.pm-modal-only body {
  background: #fff;
}

/* Section title (benchmark-like) */
.pm-sec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

/* 섹션 타이틀이 row(wrapper) 없이 바로 나오는 경우(예: 내용(본문)) 간격 보정 */
.pm-section>.pm-sec-title {
  margin: 0 0 12px;
}

.pm-sec-title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

.pm-sec-ico svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #64748b;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pm-sec-text {
  line-height: 1;
}

/* Conversation starters (benchmark-like boxes) */
.pm-starters {
  display: grid;
  gap: 10px;
}

.pm-starter-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.5;
}



/* Inline meta rows (Tag / Capabilities) */
.pm-section-meta {
  margin-top: 28px;
}

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

.pm-inline-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.pm-inline-title .pm-sec-ico {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pm-inline-title .pm-sec-ico svg {
  width: 18px;
  height: 18px;
  stroke: #64748b;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pm-inline-title .pm-sec-text {
  font-size: 12px;
  letter-spacing: .08em;
  color: #64748b;
  font-weight: 800;
}

.pm-inline-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 220px;
}

/* Sticky footer (modal-like) */
.pm-view {
  position: relative;
}

.pm-sticky-footer {
  position: sticky;
  bottom: 0;
  z-index: 50;

  /* full width of the view; content aligns via inner padding */
  margin: 0;
  width: 100%;
  box-sizing: border-box;

  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-top: 1px solid #eef0f6;
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
}

.pm-sticky-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px;
}

.pm-sticky-spacer {
  height: 76px;
}

/* In modal(iframe) we want the stickybar to always be visible */
html.pm-modal-doc .pm-sticky-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  border-radius: 0;
}

html.pm-modal-doc .pm-sticky-footer__inner {
  max-width: 100%;
}

html.pm-modal-doc .pm-sticky-spacer {
  height: 92px;
}

.pm-sticky-date {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.pm-sticky-locked {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
}

.pm-sticky-copy {
  white-space: nowrap;
}

/* System Instructions inline copy button (benchmark-like) */
.pm-sys-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #dbe3f5;
  background: #f8fafc;
  font-weight: 800;
  font-size: 12px;
  color: #9333EA;
  cursor: pointer;
  user-select: none;
}

.pm-sys-copy-btn svg {
  width: 16px;
  height: 16px;
  stroke: #9333EA;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pm-sys-copy-btn:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.pm-sys-copy-btn.is-copied {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.pm-sys-copy-btn.is-copied svg {
  stroke: #166534;
}

.pm-toast {
  position: fixed;
  z-index: 9999;
  padding: 10px 14px;
  border-radius: 12px;
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
  font-weight: 900;
  font-size: 12px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .12);
}

/* Prevent horizontal scroll in modal */
html.pm-modal-doc,
html.pm-modal-doc body {
  overflow-x: hidden;
}

html.pm-modal-doc .pm-view,
html.pm-modal-doc .pm-view-overlay {
  overflow-x: hidden;
}

html.pm-modal-doc .pm-text-body,
html.pm-modal-doc .pm-system-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}