/* DGTULS Prompt Library v1.0 — loads after dg-tools.css tokens (falls back if absent) */
.dgp { --p-pink: var(--c-pink, #ff2e9a); }
.dgp-intro { margin: 0 0 14px; font-family: var(--f-mono, monospace); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--t-text-3, #767186); }
.dgp-bar { display: grid; gap: 12px; margin-bottom: 20px; }
.dgp-search { min-height: 52px; font-size: 1.0625rem; padding-left: 44px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767186' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center / 20px; }
.dgp-cats .dgt-choices { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.dgp-cats .dgt-choices::-webkit-scrollbar { display: none; }
.dgp-cats .dgt-choice { white-space: nowrap; }
.dgp-bar__row--sub { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dgp-bar__right { display: flex; align-items: center; gap: 12px; }
.dgp-count { font-size: .875rem; color: var(--t-text-3, #767186); white-space: nowrap; }
.dgp-sort { width: auto; min-height: 38px; font-size: .875rem; }

.dgp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dgp-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; background: #fff; border: 1px solid var(--t-line, #e6e3ed); border-radius: var(--r-lg, 14px); transition: border-color .15s, box-shadow .15s, transform .15s; min-width: 0; }
.dgp-card:hover { border-color: var(--t-line-2, #d6d2e0); box-shadow: var(--sh-2, 0 4px 14px -4px rgba(20,18,27,.12)); transform: translateY(-1px); }
.dgp-card--pro { background: linear-gradient(180deg, #fcfaff, #fff 40%); }
.dgp-card__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dgp-cat { font-family: var(--f-mono, monospace); font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--t-text-3, #767186); }
.dgp-badge { margin-left: auto; height: 22px; padding: 0 9px; display: inline-flex; align-items: center; border-radius: 999px; font-size: .6875rem; font-weight: 700; letter-spacing: .04em; }
.dgp-badge--free { background: #e5f6ee; color: #0b6d4a; }
.dgp-badge--pro { background: var(--t-grad, linear-gradient(100deg,#ff2e9a,#c026ea 52%,#7a2cf5)); color: #fff; }
.dgp-card__title { margin: 0; font-family: var(--f-display, Sora, sans-serif); font-weight: 650; font-size: 1.0625rem; line-height: 1.3; }
.dgp-card__title a { color: var(--t-text, #14121b); text-decoration: none; }
.dgp-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.dgp-card__title a:focus-visible { outline: none; }
.dgp-card:has(.dgp-card__title a:focus-visible) { outline: 2px solid var(--c-focus, #a23bff); outline-offset: 2px; }
.dgp-card__use { margin: 0; font-size: .9375rem; line-height: 1.5; color: var(--t-text-2, #4a4659); }
.dgp-card__preview { margin: 0; padding: 10px 12px; max-height: 96px; overflow: hidden; border-radius: 10px; background: var(--t-soft, #f7f6fa); border: 1px solid var(--t-line, #e6e3ed); font-family: var(--f-mono, monospace); font-size: .75rem; line-height: 1.55; color: var(--t-text-2, #4a4659); white-space: pre-wrap; word-break: break-word; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.dgp-card__meta { font-size: .75rem; color: var(--t-text-3, #767186); margin-top: auto; }
.dgp-card__actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; }
.dgp-save { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--t-line-2, #d6d2e0); background: #fff; color: var(--t-text-2, #4a4659); font-size: 1rem; cursor: pointer; line-height: 1; }
.dgp-save.is-on { color: var(--p-pink); border-color: var(--p-pink); }
.dgp-save:focus-visible { outline: 2px solid var(--c-focus, #a23bff); outline-offset: 2px; }
.dgp-var { display: inline-block; padding: 0 6px; border-radius: 6px; background: rgba(122,44,245,.12); color: #5a23c8; font-weight: 600; }
.dgt-out .dgp-var { background: rgba(196,181,253,.18); color: #d8ccff; }
.dgp-morewrap { display: flex; justify-content: center; margin-top: 24px; }
.dgp-more[hidden] { display: none; }
.dgp-empty { grid-column: 1 / -1; }

/* Single */
.dgp-shead { display: grid; gap: 8px; margin-bottom: 20px; }
.dgp-shead .dgp-badge { margin-left: 0; }
.dgp-shead .dgp-save { margin-left: auto; }
.dgp-use { margin: 0; font-size: 1.125rem; line-height: 1.5; color: var(--t-text-2, #4a4659); }
.dgp-works { font-size: .875rem; color: var(--t-text-3, #767186); }
.dgp-panel { margin-bottom: 8px; }
.dgp-out { max-height: none; font-size: .875rem; }
.dgp-tips { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .9375rem; line-height: 1.5; color: var(--t-text-2, #4a4659); }
.dgp-open { font-size: .875rem; }
.dgp-open a { color: #ff7cc4; }
.dgp-h2 { margin: 48px 0 16px; font-family: var(--f-display, Sora, sans-serif); font-size: 1.5rem; }
.dgp-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dgp-rel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dgp-tool { display: grid; gap: 4px; padding: 16px; border-radius: var(--r-lg, 14px); background: var(--t-ink, #0a0910); color: #fff; text-decoration: none; transition: filter .15s; }
.dgp-tool:hover { filter: brightness(1.15); }
.dgp-tool strong { font-family: var(--f-display, Sora, sans-serif); }
.dgp-tool span { font-size: .875rem; color: var(--t-ink-text-2, #b7b2c6); }
.dgp-lockwrap { position: relative; display: grid; gap: 0; }
.dgp-code { margin: 0; padding: 16px; border-radius: 14px 14px 0 0; background: var(--t-ink, #0a0910); color: var(--t-ink-text, #f5f3fa); font-family: var(--f-mono, monospace); font-size: .875rem; line-height: 1.6; white-space: pre-wrap; }
.dgp-locked { -webkit-mask-image: linear-gradient(#000 30%, transparent); mask-image: linear-gradient(#000 30%, transparent); }
.dgp-gate { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 22px; border-radius: 0 0 14px 14px; background: var(--t-ink, #0a0910); color: #fff; }
.dgp-gate__t { font-family: var(--f-display, Sora, sans-serif); font-weight: 650; }
.dgp-muted { color: var(--t-text-3, #767186); font-size: .875rem; }
.dgp-fallback { margin: 0; padding-left: 18px; }

@media (max-width: 980px) { .dgp-grid, .dgp-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .dgp-grid, .dgp-grid--3, .dgp-rel { grid-template-columns: minmax(0, 1fr); }
  .dgp-bar__row--sub { align-items: flex-start; }
  .dgp-card__actions .dgt-btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .dgp-card { transition: none; } .dgp-card:hover { transform: none; } }
.dgp-bar > *, .dgp-bar__row, .dgp-cats { min-width: 0; max-width: 100%; }
.dgp-cats { overflow: hidden; }
.dgp { min-width: 0; max-width: 100%; }
.dgp-panel .dgt-in > .dgt-btn { justify-self: start; }
.dgp-cats { -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); }

/* Task 50 §11: wrap the category chips on desktop; on phones they scroll with a fade at the edge. */
@media (min-width: 900px) {
	.dgp-cats { overflow: visible; -webkit-mask-image: none; mask-image: none; }
	.dgp-cats .dgt-choices { flex-wrap: wrap; overflow: visible; }
}
@media (max-width: 899px) {
	.dgp-cats .dgt-choices { -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; padding-right: 32px; }
	.dgp-cats .dgt-choice { scroll-snap-align: start; }
}
