:root {
  color-scheme: dark;
  --bg: #0F1012;
  --surface: #17181B;
  --raised: #1F2024;
  --border: #2A2B30;
  --text: #ECEAE6;
  --secondary: #A3A19C;
  --muted: #6E6C68;
  --accent: #F2A65A;
  --accent-hover: #F7B977;
  --on-accent: #1A1206;
  --tool: #7FB3A6;
  --radius: 12px;
  --font: 'Segoe UI Variable', 'Segoe UI', Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
.glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(242,166,90,0.14), transparent 70%);
  z-index: 0;
}
.top, main, .foot { position: relative; z-index: 1; }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.logo {
  width: 28px; height: 28px; border-radius: 8px;
  background: radial-gradient(circle at 50% 70%, #F2A65A, #8B4513 70%);
  box-shadow: 0 0 16px rgba(242,166,90,0.35);
}
nav { display: flex; gap: 18px; }
nav a { color: var(--secondary); font-size: 14px; }
nav a:hover { color: var(--text); }
.hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 64px 24px 40px;
  text-align: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 12px;
}
h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}
.lede { color: var(--secondary); font-size: 17px; margin: 0 auto 28px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn.ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn.ghost:hover { border-color: var(--secondary); }
.meta { margin-top: 16px; color: var(--muted); font-size: 13px; }
.catalog { max-width: 1100px; margin: 0 auto; padding: 24px 24px 80px; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.toolbar h2 { margin: 0; font-size: 22px; }
.filters { display: flex; flex-direction: column; gap: 10px; min-width: min(100%, 420px); }
#q {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  outline: none;
}
#q:focus { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); box-shadow: 0 0 0 3px rgba(242,166,90,0.15); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--raised);
  border: 1px solid var(--border);
  color: var(--secondary);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.chip.active, .chip:hover { color: var(--text); border-color: var(--accent); }
.chip[data-type="tool"].active { color: var(--tool); border-color: var(--tool); }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease;
  text-align: left;
  color: inherit;
  font: inherit;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-1px); }
.card-top { display: flex; gap: 12px; align-items: center; }
.card-top img {
  width: 44px; height: 44px; border-radius: 10px; background: var(--raised); object-fit: cover;
}
.card h3 { margin: 0; font-size: 16px; }
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tool) 16%, transparent);
  color: var(--tool);
}
.badge.skill, .badge.prompt { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.badge.theme { background: color-mix(in srgb, #A78BFA 16%, transparent); color: #A78BFA; }
.card p { margin: 0; color: var(--secondary); font-size: 13px; flex: 1; }
.card-foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.empty { text-align: center; color: var(--muted); padding: 40px; }
.hidden { display: none !important; }
.foot {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  color: var(--secondary);
  font-size: 13px;
}
.muted { color: var(--muted); }
code { font-family: ui-monospace, Cascadia Mono, Consolas, monospace; font-size: 12px; }
dialog {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  padding: 0;
  max-width: 520px;
  width: calc(100% - 32px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.55);
}
dialog::backdrop { background: rgba(0,0,0,0.65); }
.detail-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.detail-card header { display: flex; gap: 14px; align-items: center; }
.detail-card header img { border-radius: 12px; background: var(--raised); }
.detail-card h3 { margin: 0; }
.icon-x {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--secondary);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.perms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}
.perm {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--secondary);
}
.detail-card footer { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .top { padding: 12px 16px; }
  nav { display: none; }
  .hero { padding-top: 40px; }
}
