body { background: var(--bg-deep); color: var(--text-primary); font-family: var(--font-body); }
.page { max-width: 1200px; margin: 0 auto; padding: 24px; }
.header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.header h1 { font-size: 24px; margin: 0; }
.header-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.header a { color: var(--text-secondary); text-decoration: none; }
.tabs { display: flex; gap: 8px; margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.tab { padding: 8px 16px; border: 0; border-radius: var(--radius-sm); cursor: pointer; color: var(--text-secondary); background: transparent; font: inherit; }
.tab.active { background: var(--amber-dim); color: var(--amber); }
.tab:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.panel-sub { margin: 0 0 16px; color: var(--text-secondary); font-size: 13px; line-height: 1.55; }
.panel-sub strong { color: var(--text-primary); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: stretch; }
.card {
  display: flex; flex-direction: column;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 16px; box-shadow: var(--shadow-card); min-height: 100%;
}
.card h3 { margin: 0 0 8px; font-size: 16px; line-height: 1.35; }
.card p {
  margin: 0 0 12px; color: var(--text-secondary); font-size: 14px; line-height: 1.5;
  flex: 1 1 auto;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  min-height: calc(1.5em * 3);
}
.card .meta {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px;
  min-height: 28px; align-content: flex-start;
}
.install-hint {
  font-size: 12px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.4;
  min-height: 1.4em;
}
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg-surface); color: var(--text-muted); }
.card .actions {
  display: flex; gap: 8px; margin-top: auto; padding-top: 4px;
  align-items: center;
}
.card .actions .btn { width: 100%; text-align: center; }
.btn { padding: 8px 16px; border-radius: var(--radius-sm); border: none; cursor: pointer; font-size: 14px; line-height: 1.3; }
.btn-primary { background: var(--amber); color: #fff; }
.btn-secondary { background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--border); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.empty { text-align: center; padding: 48px; color: var(--text-muted); }
.error { color: var(--red); padding: 12px; background: var(--red-dim); border-radius: var(--radius-sm); margin-bottom: 16px; }
.loading { text-align: center; color: var(--text-muted); padding: 48px; }
.role-group { margin-bottom: 28px; }
.role-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.role-group-head h2 { margin: 0; font-size: 17px; }
.role-group-meta { font-size: 12px; color: var(--text-muted); }
.skill-modal-overlay {
  position: fixed; inset: 0; z-index: 10040; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.skill-modal {
  width: min(440px, 96vw); max-height: 86vh; overflow: auto;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; box-shadow: 0 16px 40px rgba(0,0,0,.3);
}
.skill-modal h3 { margin: 0 0 8px; font-size: 17px; }
.skill-modal-desc { margin: 0 0 14px; font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.skill-modal-roles { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.skill-role-check {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
  background: var(--bg-surface);
}
.skill-role-check:hover { border-color: var(--amber); }
.skill-role-check input { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--amber); }
.skill-role-check span { flex: 1; font-size: 14px; color: var(--text-primary); }
.skill-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
